github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/internal/bucket/replication/datatypes.go (about) 1 // Copyright (c) 2015-2021 MinIO, Inc. 2 // 3 // This file is part of MinIO Object Storage stack 4 // 5 // This program is free software: you can redistribute it and/or modify 6 // it under the terms of the GNU Affero General Public License as published by 7 // the Free Software Foundation, either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU Affero General Public License for more details. 14 // 15 // You should have received a copy of the GNU Affero General Public License 16 // along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18 package replication 19 20 //go:generate msgp -file=$GOFILE 21 22 // StatusType of Replication for x-amz-replication-status header 23 type StatusType string 24 25 // Type - replication type enum 26 type Type int 27 28 const ( 29 // Pending - replication is pending. 30 Pending StatusType = "PENDING" 31 32 // Completed - replication completed ok. 33 Completed StatusType = "COMPLETED" 34 35 // CompletedLegacy was called "COMPLETE" incorrectly. 36 CompletedLegacy StatusType = "COMPLETE" 37 38 // Failed - replication failed. 39 Failed StatusType = "FAILED" 40 41 // Replica - this is a replica. 42 Replica StatusType = "REPLICA" 43 ) 44 45 // String returns string representation of status 46 func (s StatusType) String() string { 47 return string(s) 48 } 49 50 // Empty returns true if this status is not set 51 func (s StatusType) Empty() bool { 52 return string(s) == "" 53 }