datatype

package
v0.0.0-...-8b27293 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	Canned      string        `json:"Canned"`
	FULLCONTROL []interface{} `json:"FULL_CONTROL"`
	WRITEACP    []interface{} `json:"WRITE_ACP"`
	READ        []interface{} `json:"READ"`
	READACP     []interface{} `json:"READ_ACP"`
}

type AbortMultipartUploadRequest

type AbortMultipartUploadRequest struct {
	Service *s3.S3
	Resp    *s3.CreateMultipartUploadOutput
}

type Acl

type Acl struct {
	Owner      s3.Owner   // used for setting a new owner
	Grantee    s3.Grantee //  Email address and type
	Email      string
	ID         string
	Type       string
	Permission string
}

type BucketInfo

type BucketInfo struct {
	Name                     string      `json:"name"`
	Owner                    string      `json:"owner"`
	OwnerDisplayName         string      `json:"ownerDisplayName"`
	CreationDate             time.Time   `json:"creationDate"`
	MdBucketModelVersion     int         `json:"mdBucketModelVersion"`
	Transient                bool        `json:"transient"`
	Deleted                  bool        `json:"deleted"`
	ServerSideEncryption     interface{} `json:"serverSideEncryption"`
	VersioningConfiguration  interface{} `json:"versioningConfiguration"`
	LocationConstraint       string      `json:"locationConstraint"`
	Cors                     interface{} `json:"cors"`
	ReplicationConfiguration interface{} `json:"replicationConfiguration"`
	LifecycleConfiguration   interface{} `json:"lifecycleConfiguration"`
}

type Bucketclient

type Bucketclient struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Body    interface{} `json:"body"`
}

type ByPart

type ByPart []*s3.CompletedPart

sorting an CompletePart

func (ByPart) Len

func (ar ByPart) Len() int

func (ByPart) Less

func (ar ByPart) Less(i, j int) bool

func (ByPart) Swap

func (ar ByPart) Swap(i, j int)

type Cluster

type Cluster struct {
	Num   int     `json:"num"`
	Repds []Repds `json:"repds"`
	Wsbs  []Wsbs  `json:"wsbs"`
}

func (Cluster) GetNum

func (c Cluster) GetNum() int

func (Cluster) GetRepds

func (c Cluster) GetRepds() []Repds

func (Cluster) GetWsbs

func (c Cluster) GetWsbs() []Wsbs

type Clusters

type Clusters struct {
	Topology []Cluster `json:"topology"`
}

func (Clusters) GetCluster

func (c Clusters) GetCluster() []Cluster

func (Clusters) GetHost

func (c Clusters) GetHost() (error, *map[string]bool)

func (Clusters) New

func (c Clusters) New(file string) (error, *Clusters)

type CompleteMultipartUploadRequest

type CompleteMultipartUploadRequest struct {
	Service        *s3.S3
	Resp           *s3.CreateMultipartUploadOutput
	CompletedParts []*s3.CompletedPart
}

type Contents

type Contents struct {
	Key   string `json:"key"`
	Value Value  `json:"value"`
}

type CopyObjRequest

type CopyObjRequest struct {
	Service *s3.S3
	Sbucket string
	Tbucket string
	Skey    string
	Tkey    string
}

type CopyObjsRequest

type CopyObjsRequest struct {
	Service *s3.S3
	Sbucket string
	Tbucket string
	Skey    []string
	Tkey    []string
}

type CreateMultipartUploadRequest

type CreateMultipartUploadRequest struct {
	Service     *s3.S3
	Bucket      string
	Key         string
	Metadata    map[string]*string
	VersionId   string
	ContentType string
}

type CreateSession

type CreateSession struct {
	Region     string
	EndPoint   string
	AccessKey  string
	SecretKey  string
	MaxRetries int
}

type DeleteBucketRequest

type DeleteBucketRequest struct {
	Service *s3.S3
	Bucket  string
}

type DeleteObjRequest

type DeleteObjRequest struct {
	Service   *s3.S3
	Bucket    string
	Key       string
	VersionId string
}

type FputObjRequest

type FputObjRequest struct {
	Service   *s3.S3
	Bucket    string
	Key       string
	Inputfile string
	Usermd    map[string]string
	Meta      []byte
}

type GetBucketAclRequest

type GetBucketAclRequest struct {
	Service *s3.S3
	Bucket  string
}

type GetBucketPolicyRequest

type GetBucketPolicyRequest struct {
	Service *s3.S3
	Bucket  string
}

type GetBucketReplicationRequest

type GetBucketReplicationRequest struct {
	Service *s3.S3
	Bucket  string
}

type GetMultipartObjRequest

type GetMultipartObjRequest struct {
	Service        *s3.S3
	Bucket         string
	Key            string
	PartNumber     int64
	PartSize       int64
	Concurrency    int
	OutputFilePath string
	Discard        bool
}

type GetObjAclRequest

type GetObjAclRequest struct {
	Service *s3.S3
	Bucket  string
	Key     string
}

type GetObjRequest

type GetObjRequest struct {
	Service   *s3.S3
	Bucket    string
	Key       string
	VersionId string
}

type HealthCheck

type HealthCheck struct {
	CnNorth1     HealthCode   `json:"cn-north-1,omitempty"`
	UsWest1      HealthCode   `json:"us-west-1,omitempty"`
	UsEast1      HealthCode   `json:"us-east-1,omitempty"`
	UsEast2      HealthCode   `json:"us-east-2,omitempty"`
	ApNortheast1 HealthCode   `json:"ap-northeast-1,omitempty"`
	SaEast1      HealthCode   `json:"sa-east-1,omitempty"`
	CaCentral1   HealthCode   `json:"ca-central-1,omitempty"`
	ApSoutheast2 HealthCode   `json:"ap-southeast-2,omitempty"`
	UsWest2      HealthCode   `json:"us-west-2,omitempty"`
	Dc1          HealthCode   `json:"dc-1,omitempty"`
	EuCentral1   HealthCode   `json:"eu-central-1,omitempty"`
	EU           HealthCode   `json:"EU,omitempty"`
	ApSoutheast1 HealthCode   `json:"ap-southeast-1,omitempty"`
	ApNortheast2 HealthCode   `json:"ap-northeast-2,omitempty"`
	EuWest2      HealthCode   `json:"eu-west-2,omitempty"`
	Sproxyd      HealthCode   `json:"sproxyd"`
	ApSouth1     HealthCode   `json:"ap-south-1,omitempty"`
	EuWest1      HealthCode   `json:"eu-west-1,omitempty"`
	Bucketclient Bucketclient `json:"bucketclient"`
	Vault        Vault        `json:"vault"`
}

func (HealthCheck) GetBucketCode

func (h HealthCheck) GetBucketCode() Bucketclient

func (HealthCheck) GetEUCode

func (h HealthCheck) GetEUCode() HealthCode

func (HealthCheck) GetSproxyd

func (h HealthCheck) GetSproxyd() HealthCode

func (HealthCheck) GetVaultCode

func (h HealthCheck) GetVaultCode() Vault

func (HealthCheck) Print

func (h HealthCheck) Print(name string)

type HealthCode

type HealthCode struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type LevelDBMeta

type LevelDBMeta struct {
	Bucket struct {
		Name                     string      `json:"name"`
		Owner                    string      `json:"owner"`
		OwnerDisplayName         string      `json:"ownerDisplayName"`
		CreationDate             time.Time   `json:"creationDate"`
		MdBucketModelVersion     int         `json:"mdBucketModelVersion"`
		Transient                bool        `json:"transient"`
		Deleted                  bool        `json:"deleted"`
		ServerSideEncryption     interface{} `json:"serverSideEncryption"`
		VersioningConfiguration  interface{} `json:"versioningConfiguration"`
		LocationConstraint       string      `json:"locationConstraint"`
		Cors                     interface{} `json:"cors"`
		ReplicationConfiguration interface{} `json:"replicationConfiguration"`
		LifecycleConfiguration   interface{} `json:"lifecycleConfiguration"`
	} `json:"bucket"`
	Obj struct {
		OwnerDisplayName                          string `json:"owner-display-name"`
		OwnerID                                   string `json:"owner-id"`
		ContentLength                             int    `json:"content-length"`
		ContentMd5                                string `json:"content-md5"`
		XAmzVersionID                             string `json:"x-amz-version-id"`
		XAmzServerVersionID                       string `json:"x-amz-server-version-id"`
		XAmzStorageClass                          string `json:"x-amz-storage-class"`
		XAmzServerSideEncryption                  string `json:"x-amz-server-side-encryption"`
		XAmzServerSideEncryptionAwsKmsKeyID       string `json:"x-amz-server-side-encryption-aws-kms-key-id"`
		XAmzServerSideEncryptionCustomerAlgorithm string `json:"x-amz-server-side-encryption-customer-algorithm"`
		XAmzWebsiteRedirectLocation               string `json:"x-amz-website-redirect-location"`
		ACL                                       struct {
			Canned      string        `json:"Canned"`
			FULLCONTROL []interface{} `json:"FULL_CONTROL"`
			WRITEACP    []interface{} `json:"WRITE_ACP"`
			READ        []interface{} `json:"READ"`
			READACP     []interface{} `json:"READ_ACP"`
		} `json:"acl"`
		Key            string      `json:"key"`
		Location       interface{} `json:"location"`
		IsDeleteMarker bool        `json:"isDeleteMarker"`
		Tags           struct {
		} `json:"tags"`
		ReplicationInfo struct {
			Status             string        `json:"status"`
			Backends           []interface{} `json:"backends"`
			Content            []interface{} `json:"content"`
			Destination        string        `json:"destination"`
			StorageClass       string        `json:"storageClass"`
			Role               string        `json:"role"`
			StorageType        string        `json:"storageType"`
			DataStoreVersionID string        `json:"dataStoreVersionId"`
		} `json:"replicationInfo"`
		DataStoreName  string    `json:"dataStoreName"`
		LastModified   time.Time `json:"last-modified"`
		MdModelVersion int       `json:"md-model-version"`
		XAmzMetaUsermd string    `json:"x-amz-meta-usermd"`
	} `json:"obj"`
}

structure returned by LevelDB GET

type LevelDBMetadata

type LevelDBMetadata struct {
	Bucket BucketInfo `json:"bucket"`
	Object Value      `json:"obj,omitempty"`
}

type ListBucketRequest

type ListBucketRequest struct {
	Service *s3.S3
}

type ListMultipartObjRequest

type ListMultipartObjRequest struct {
	Service        *s3.S3
	Bucket         string
	Prefix         string
	MaxUploads     int64
	UploadIdmarker string
	KeyMarker      string
	Delimiter      string
}

type ListObjLdbRequest

type ListObjLdbRequest struct {
	Url        string
	Bucket     string
	Prefix     string
	MaxKey     int64
	Marker     string
	ListMaster bool
	Delimiter  string
}

type ListObjRequest

type ListObjRequest struct {
	Service   *s3.S3
	Bucket    string
	Prefix    string
	MaxKey    int64
	Marker    string
	Delimiter string
}

type ListObjV2Request

type ListObjV2Request struct {
	Service           *s3.S3
	Bucket            string
	Prefix            string
	MaxKey            int64
	Continuationtoken string
	Marker            string
	Delimiter         string
}

type ListObjVersionsRequest

type ListObjVersionsRequest struct {
	Service         *s3.S3
	Bucket          string
	Prefix          string
	MaxKey          int64
	KeyMarker       string
	VersionIdMarker string
	Delimiter       string
}

type Location

type Location []struct {
	Key           string `json:"key"`
	Size          int    `json:"size"`
	Start         int    `json:"start"`
	DataStoreName string `json:"dataStoreName"`
	DataStoreType string `json:"dataStoreType"`
	DataStoreETag string `json:"dataStoreETag"`
}

type MakeBucketRequest

type MakeBucketRequest struct {
	Service *s3.S3
	Bucket  string
}

type MultiPartUploadRequest

type MultiPartUploadRequest struct {
	Service    *s3.S3
	Bucket     string
	Key        string
	PartNumber int64
	UploadId   string
	Buffer     *bytes.Buffer
}

type PutBucketAclRequest

type PutBucketAclRequest struct {
	Service *s3.S3
	Bucket  string
	ACL     Acl
}

type PutObjRequest

type PutObjRequest struct {
	Service   *s3.S3
	Bucket    string
	Key       string
	Buffer    *bytes.Buffer
	Usermd    map[string]string
	Meta      []byte
	VersionId string
}

type PutObjRequest3

type PutObjRequest3 struct {
	Service     *s3.S3
	Bucket      string
	Key         string
	Buffer      *bytes.Buffer
	Metadata    map[string]*string
	ContentType string
}

type PutObjectAclRequest

type PutObjectAclRequest struct {
	Service *s3.S3
	Bucket  string
	Key     string
	ACL     Acl
}

type RaftBucket

type RaftBucket struct {
	RaftSessionID int        `json:"raftSessionId"`
	Leader        RaftLeader `json:"leader"`
	Creating      bool       `json:"creating"`
	Deleting      bool       `json:"deleting"`
	Version       int        `json:"version"`
}

type RaftLeader

type RaftLeader struct {
	IP   string `json:"ip,omitempty"`
	Port int    `json:"port,omitempty"`
}

type RaftMembers

type RaftMembers struct {
	AdminPort   int    `json:"adminPort"`
	DisplayName string `json:"display_name"`
	Host        string `json:"host"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Port        int    `json:"port"`
	Site        string `json:"site"`
}

type RaftSession

type RaftSession struct {
	ID                int           `json:"id"`
	RaftMembers       []RaftMembers `json:"raftMembers"`
	ConnectedToLeader bool          `json:"connectedToLeader"`
}

type RaftSessionInfo

type RaftSessionInfo struct {
	Leader       RaftMembers   `json:"leader"`
	Connected    []RaftMembers `json:"connected"`
	Disconnected []RaftMembers `json:"disconnected"`
}

type RaftSessions

type RaftSessions []struct {
	ID                int           `json:"id"`
	RaftMembers       []RaftMembers `json:"raftMembers"`
	ConnectedToLeader bool          `json:"connectedToLeader"`
}

func (RaftSessions) GetRaftSessions

func (c RaftSessions) GetRaftSessions(file string) (error, *RaftSessions)

type RaftState

type RaftState struct {
	Term       int `json:"term"`
	Voted      int `json:"voted"`
	Appended   int `json:"appended"`
	Backups    int `json:"backups"`
	Committing int `json:"committing"`
	Committed  int `json:"committed"`
	Pruned     int `json:"pruned"`
}

type Rb

type Rb struct {
	Key    string
	Object *bytes.Buffer
	Result *s3.GetObjectOutput
	Err    error
}

type Rc

type Rc struct {
	Key    string
	Result *s3.CopyObjectOutput
	Err    error
}

type Repds

type Repds struct {
	AdminPort   int    `json:"adminPort"`
	DisplayName string `json:"display_name"`
	Host        string `json:"host"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Port        int    `json:"port"`
	Site        string `json:"site"`
}

type ReplicationInfo

type ReplicationInfo struct {
	Status   string `json:"status"`
	Backends []struct {
		Site               string `json:"site"`
		Status             string `json:"status"`
		DataStoreVersionID string `json:"dataStoreVersionId"`
	} `json:"backends"`
	Content      []string `json:"content"`
	Destination  string   `json:"destination"`
	StorageClass string   `json:"storageClass"`
	Role         string   `json:"role"`
	StorageType  string   `json:"storageType"`
}

type Reqm

type Reqm struct {
	SrcS3       *s3.S3
	SrcBucket   string
	TgtS3       *s3.S3
	TgtBucket   string
	Incremental bool
}

migration request

type Rh

type Rh struct {
	Key    string
	Result *s3.HeadObjectOutput
	Err    error
}

type Rlb

type Rlb struct {
	StatusCode int
	Contents   string
	Err        error
}

type Rm

type Rm struct {
	Nerrors  int
	Ndocs    int
	Npages   int
	Docsizes int
}

type Ro

type Ro struct {
	Key    string
	Result *s3.GetObjectOutput
	Err    error
}

type Robj

type Robj struct {
	Key      string
	Body     *bytes.Buffer
	Metadata map[string]*string
	Err      error
}

type Rp

type Rp struct {
	Idir   string
	Key    string
	Result *s3.PutObjectOutput
	Err    error
}

type S3Metadata

type S3Metadata struct {
	CommonPrefixes []interface{} `json:"CommonPrefixes"`
	Contents       []Contents    `json:"Contents"`
	IsTruncated    bool          `json:"IsTruncated"`
}

type StatBucketRequest

type StatBucketRequest struct {
	Service *s3.S3
	Bucket  string
}

type StatObjRequest

type StatObjRequest struct {
	Service *s3.S3
	Bucket  string
	Key     string
}

type StatObjRequestV2

type StatObjRequestV2 struct {
	Client    *http.Client
	Request   string
	AccessKey string
	SecretKey string
	Bucket    string
	Key       string
}

type Tags

type Tags struct {
}

type UploadPartRequest

type UploadPartRequest struct {
	Service     *s3.S3
	Resp        *s3.CreateMultipartUploadOutput
	Content     []byte
	PartNumber  int
	RetryNumber int
	WaitTime    time.Duration
}

type Value

type Value struct {
	OwnerDisplayName                          string          `json:"owner-display-name"`
	OwnerID                                   string          `json:"owner-id"`
	ContentLength                             int             `json:"content-length"`
	ContentMd5                                string          `json:"content-md5"`
	XAmzVersionID                             string          `json:"x-amz-version-id"`
	XAmzServerVersionID                       string          `json:"x-amz-server-version-id"`
	XAmzStorageClass                          string          `json:"x-amz-storage-class"`
	XAmzServerSideEncryption                  string          `json:"x-amz-server-side-encryption"`
	XAmzServerSideEncryptionAwsKmsKeyID       string          `json:"x-amz-server-side-encryption-aws-kms-key-id"`
	XAmzServerSideEncryptionCustomerAlgorithm string          `json:"x-amz-server-side-encryption-customer-algorithm"`
	XAmzWebsiteRedirectLocation               string          `json:"x-amz-website-redirect-location"`
	ACL                                       ACL             `json:"acl"`
	Key                                       string          `json:"key"`
	Location                                  Location        `json:"location"`
	IsDeleteMarker                            bool            `json:"isDeleteMarker"`
	Tags                                      Tags            `json:"tags"`
	ReplicationInfo                           ReplicationInfo `json:"replicationInfo"`
	DataStoreName                             string          `json:"dataStoreName"`
	LastModified                              time.Time       `json:"last-modified"`
	MdModelVersion                            int             `json:"md-model-version"`
	XAmzMetaUsermd                            string          `json:"x-amz-meta-usermd"`
}

func (Value) IsEmpty

func (v Value) IsEmpty() bool

check is value ovject is empty

func (Value) PrintRepInfo

func (v Value) PrintRepInfo(key string, log *log.Logger)

type Vault

type Vault struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Body    interface{} `json:"body"`
}

type Wsbs

type Wsbs struct {
	AdminPort   int    `json:"adminPort"`
	DisplayName string `json:"display_name"`
	Host        string `json:"host"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Port        int    `json:"port"`
	Site        string `json:"site"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL