s3x

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package s3x is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrLedgerBucketExists is an error message returned from the internal
	// ledgerStore indicating that a bucket already exists
	ErrLedgerBucketExists = errors.New("bucket exists")
	// ErrLedgerBucketDoesNotExist is an error message returned from the internal
	// ledgerStore indicating that a bucket does not exist
	ErrLedgerBucketDoesNotExist = errors.New("bucket does not exist")
	// ErrLedgerObjectDoesNotExist is an error message returned from the internal
	// ledgerStore indicating that a object does not exist
	ErrLedgerObjectDoesNotExist = errors.New("object does not exist")
	// ErrLedgerNonEmptyBucket is an error message returned from the internal
	// ledgerStore indicating that a bucket is not empty
	ErrLedgerNonEmptyBucket = errors.New("bucket is not empty")
	// ErrInvalidUploadID is an error message returned when the multipart upload id
	// does not exist
	ErrInvalidUploadID = errors.New("invalid multipart upload id")
)
View Source
var (
	ErrInvalidLengthS3        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowS3          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupS3 = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInfoAPIHandler

func RegisterInfoAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterInfoAPIHandler registers the http handlers for service InfoAPI to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterInfoAPIHandlerClient

func RegisterInfoAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfoAPIClient) error

RegisterInfoAPIHandlerClient registers the http handlers for service InfoAPI to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InfoAPIClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InfoAPIClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "InfoAPIClient" to call the correct interceptors.

func RegisterInfoAPIHandlerFromEndpoint

func RegisterInfoAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterInfoAPIHandlerFromEndpoint is same as RegisterInfoAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterInfoAPIHandlerServer

func RegisterInfoAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfoAPIServer) error

RegisterInfoAPIHandlerServer registers the http handlers for service InfoAPI to "mux". UnaryRPC :call InfoAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterInfoAPIServer

func RegisterInfoAPIServer(s *grpc.Server, srv InfoAPIServer)

Types

type Bucket

type Bucket struct {
	// data associated with the object
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// information associated with this bucket
	BucketInfo BucketInfo `protobuf:"bytes,2,opt,name=bucketInfo,proto3" json:"bucketInfo"`
	// maps object names to object hashes
	Objects map[string]string `` /* 145-byte string literal not displayed */
}

Bucket is a data repositroy for S3 objects

func (*Bucket) Descriptor

func (*Bucket) Descriptor() ([]byte, []int)

func (*Bucket) GetBucketInfo

func (m *Bucket) GetBucketInfo() BucketInfo

func (*Bucket) GetData

func (m *Bucket) GetData() []byte

func (*Bucket) GetObjects

func (m *Bucket) GetObjects() map[string]string

func (*Bucket) Marshal

func (m *Bucket) Marshal() (dAtA []byte, err error)

func (*Bucket) MarshalTo

func (m *Bucket) MarshalTo(dAtA []byte) (int, error)

func (*Bucket) MarshalToSizedBuffer

func (m *Bucket) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Bucket) ProtoMessage

func (*Bucket) ProtoMessage()

func (*Bucket) Reset

func (m *Bucket) Reset()

func (*Bucket) Size

func (m *Bucket) Size() (n int)

func (*Bucket) String

func (m *Bucket) String() string

func (*Bucket) Unmarshal

func (m *Bucket) Unmarshal(dAtA []byte) error

func (*Bucket) XXX_DiscardUnknown

func (m *Bucket) XXX_DiscardUnknown()

func (*Bucket) XXX_Marshal

func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bucket) XXX_Merge

func (m *Bucket) XXX_Merge(src proto.Message)

func (*Bucket) XXX_Size

func (m *Bucket) XXX_Size() int

func (*Bucket) XXX_Unmarshal

func (m *Bucket) XXX_Unmarshal(b []byte) error

type BucketInfo

type BucketInfo struct {
	// name is the name of the bucket
	Name    string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Created time.Time `protobuf:"bytes,2,opt,name=created,proto3,stdtime" json:"created"`
	// the location of the bucket
	Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"`
}

BucketInfo is used to store s3 bucket metadata

func (*BucketInfo) Descriptor

func (*BucketInfo) Descriptor() ([]byte, []int)

func (*BucketInfo) GetCreated

func (m *BucketInfo) GetCreated() time.Time

func (*BucketInfo) GetLocation

func (m *BucketInfo) GetLocation() string

func (*BucketInfo) GetName

func (m *BucketInfo) GetName() string

func (*BucketInfo) Marshal

func (m *BucketInfo) Marshal() (dAtA []byte, err error)

func (*BucketInfo) MarshalTo

func (m *BucketInfo) MarshalTo(dAtA []byte) (int, error)

func (*BucketInfo) MarshalToSizedBuffer

func (m *BucketInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BucketInfo) ProtoMessage

func (*BucketInfo) ProtoMessage()

func (*BucketInfo) Reset

func (m *BucketInfo) Reset()

func (*BucketInfo) Size

func (m *BucketInfo) Size() (n int)

func (*BucketInfo) String

func (m *BucketInfo) String() string

func (*BucketInfo) Unmarshal

func (m *BucketInfo) Unmarshal(dAtA []byte) error

func (*BucketInfo) XXX_DiscardUnknown

func (m *BucketInfo) XXX_DiscardUnknown()

func (*BucketInfo) XXX_Marshal

func (m *BucketInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BucketInfo) XXX_Merge

func (m *BucketInfo) XXX_Merge(src proto.Message)

func (*BucketInfo) XXX_Size

func (m *BucketInfo) XXX_Size() int

func (*BucketInfo) XXX_Unmarshal

func (m *BucketInfo) XXX_Unmarshal(b []byte) error

type InfoAPIClient

type InfoAPIClient interface {
	GetHash(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error)
}

InfoAPIClient is the client API for InfoAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInfoAPIClient

func NewInfoAPIClient(cc *grpc.ClientConn) InfoAPIClient

type InfoAPIServer

type InfoAPIServer interface {
	GetHash(context.Context, *InfoRequest) (*InfoResponse, error)
}

InfoAPIServer is the server API for InfoAPI service.

type InfoRequest

type InfoRequest struct {
	Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	// indicates whether or not to return the object data hash
	ObjectDataOnly bool `protobuf:"varint,3,opt,name=objectDataOnly,proto3" json:"objectDataOnly,omitempty"`
}

func (*InfoRequest) Descriptor

func (*InfoRequest) Descriptor() ([]byte, []int)

func (*InfoRequest) GetBucket

func (m *InfoRequest) GetBucket() string

func (*InfoRequest) GetObject

func (m *InfoRequest) GetObject() string

func (*InfoRequest) GetObjectDataOnly

func (m *InfoRequest) GetObjectDataOnly() bool

func (*InfoRequest) Marshal

func (m *InfoRequest) Marshal() (dAtA []byte, err error)

func (*InfoRequest) MarshalTo

func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error)

func (*InfoRequest) MarshalToSizedBuffer

func (m *InfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InfoRequest) ProtoMessage

func (*InfoRequest) ProtoMessage()

func (*InfoRequest) Reset

func (m *InfoRequest) Reset()

func (*InfoRequest) Size

func (m *InfoRequest) Size() (n int)

func (*InfoRequest) String

func (m *InfoRequest) String() string

func (*InfoRequest) Unmarshal

func (m *InfoRequest) Unmarshal(dAtA []byte) error

func (*InfoRequest) XXX_DiscardUnknown

func (m *InfoRequest) XXX_DiscardUnknown()

func (*InfoRequest) XXX_Marshal

func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InfoRequest) XXX_Merge

func (m *InfoRequest) XXX_Merge(src proto.Message)

func (*InfoRequest) XXX_Size

func (m *InfoRequest) XXX_Size() int

func (*InfoRequest) XXX_Unmarshal

func (m *InfoRequest) XXX_Unmarshal(b []byte) error

type InfoResponse

type InfoResponse struct {
	Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Hash   string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
}

func (*InfoResponse) Descriptor

func (*InfoResponse) Descriptor() ([]byte, []int)

func (*InfoResponse) GetBucket

func (m *InfoResponse) GetBucket() string

func (*InfoResponse) GetHash

func (m *InfoResponse) GetHash() string

func (*InfoResponse) GetObject

func (m *InfoResponse) GetObject() string

func (*InfoResponse) Marshal

func (m *InfoResponse) Marshal() (dAtA []byte, err error)

func (*InfoResponse) MarshalTo

func (m *InfoResponse) MarshalTo(dAtA []byte) (int, error)

func (*InfoResponse) MarshalToSizedBuffer

func (m *InfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*InfoResponse) ProtoMessage

func (*InfoResponse) ProtoMessage()

func (*InfoResponse) Reset

func (m *InfoResponse) Reset()

func (*InfoResponse) Size

func (m *InfoResponse) Size() (n int)

func (*InfoResponse) String

func (m *InfoResponse) String() string

func (*InfoResponse) Unmarshal

func (m *InfoResponse) Unmarshal(dAtA []byte) error

func (*InfoResponse) XXX_DiscardUnknown

func (m *InfoResponse) XXX_DiscardUnknown()

func (*InfoResponse) XXX_Marshal

func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InfoResponse) XXX_Merge

func (m *InfoResponse) XXX_Merge(src proto.Message)

func (*InfoResponse) XXX_Size

func (m *InfoResponse) XXX_Size() int

func (*InfoResponse) XXX_Unmarshal

func (m *InfoResponse) XXX_Unmarshal(b []byte) error

type Ledger

type Ledger struct {
	// key = bucket name
	Buckets map[string]LedgerBucketEntry `` /* 145-byte string literal not displayed */
	// key = partID
	MultipartUploads map[string]MultipartUpload `` /* 163-byte string literal not displayed */
}

Ledger is our internal state keeper, and is responsible for keeping track of buckets, objects, and their corresponding IPFS hashes

func (*Ledger) Descriptor

func (*Ledger) Descriptor() ([]byte, []int)

func (*Ledger) GetBuckets

func (m *Ledger) GetBuckets() map[string]LedgerBucketEntry

func (*Ledger) GetMultipartUploads

func (m *Ledger) GetMultipartUploads() map[string]MultipartUpload

func (*Ledger) Marshal

func (m *Ledger) Marshal() (dAtA []byte, err error)

func (*Ledger) MarshalTo

func (m *Ledger) MarshalTo(dAtA []byte) (int, error)

func (*Ledger) MarshalToSizedBuffer

func (m *Ledger) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Ledger) ProtoMessage

func (*Ledger) ProtoMessage()

func (*Ledger) Reset

func (m *Ledger) Reset()

func (*Ledger) Size

func (m *Ledger) Size() (n int)

func (*Ledger) String

func (m *Ledger) String() string

func (*Ledger) Unmarshal

func (m *Ledger) Unmarshal(dAtA []byte) error

func (*Ledger) XXX_DiscardUnknown

func (m *Ledger) XXX_DiscardUnknown()

func (*Ledger) XXX_Marshal

func (m *Ledger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ledger) XXX_Merge

func (m *Ledger) XXX_Merge(src proto.Message)

func (*Ledger) XXX_Size

func (m *Ledger) XXX_Size() int

func (*Ledger) XXX_Unmarshal

func (m *Ledger) XXX_Unmarshal(b []byte) error

type LedgerBucketEntry

type LedgerBucketEntry struct {
	// key = object name
	Objects  map[string]LedgerObjectEntry `` /* 145-byte string literal not displayed */
	Name     string                       `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	IpfsHash string                       `protobuf:"bytes,3,opt,name=ipfsHash,proto3" json:"ipfsHash,omitempty"`
}

LedgerBucketEntry is an individual entry within the ledger containing information about a bucket

func (*LedgerBucketEntry) Descriptor

func (*LedgerBucketEntry) Descriptor() ([]byte, []int)

func (*LedgerBucketEntry) GetIpfsHash

func (m *LedgerBucketEntry) GetIpfsHash() string

func (*LedgerBucketEntry) GetName

func (m *LedgerBucketEntry) GetName() string

func (*LedgerBucketEntry) GetObjects

func (m *LedgerBucketEntry) GetObjects() map[string]LedgerObjectEntry

func (*LedgerBucketEntry) Marshal

func (m *LedgerBucketEntry) Marshal() (dAtA []byte, err error)

func (*LedgerBucketEntry) MarshalTo

func (m *LedgerBucketEntry) MarshalTo(dAtA []byte) (int, error)

func (*LedgerBucketEntry) MarshalToSizedBuffer

func (m *LedgerBucketEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LedgerBucketEntry) ProtoMessage

func (*LedgerBucketEntry) ProtoMessage()

func (*LedgerBucketEntry) Reset

func (m *LedgerBucketEntry) Reset()

func (*LedgerBucketEntry) Size

func (m *LedgerBucketEntry) Size() (n int)

func (*LedgerBucketEntry) String

func (m *LedgerBucketEntry) String() string

func (*LedgerBucketEntry) Unmarshal

func (m *LedgerBucketEntry) Unmarshal(dAtA []byte) error

func (*LedgerBucketEntry) XXX_DiscardUnknown

func (m *LedgerBucketEntry) XXX_DiscardUnknown()

func (*LedgerBucketEntry) XXX_Marshal

func (m *LedgerBucketEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LedgerBucketEntry) XXX_Merge

func (m *LedgerBucketEntry) XXX_Merge(src proto.Message)

func (*LedgerBucketEntry) XXX_Size

func (m *LedgerBucketEntry) XXX_Size() int

func (*LedgerBucketEntry) XXX_Unmarshal

func (m *LedgerBucketEntry) XXX_Unmarshal(b []byte) error

type LedgerObjectEntry

type LedgerObjectEntry struct {
	IpfsHash string `protobuf:"bytes,1,opt,name=ipfsHash,proto3" json:"ipfsHash,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}

LedgerObjectEntry is an individual entry within an bucket, containing information about an object

func (*LedgerObjectEntry) Descriptor

func (*LedgerObjectEntry) Descriptor() ([]byte, []int)

func (*LedgerObjectEntry) GetIpfsHash

func (m *LedgerObjectEntry) GetIpfsHash() string

func (*LedgerObjectEntry) GetName

func (m *LedgerObjectEntry) GetName() string

func (*LedgerObjectEntry) Marshal

func (m *LedgerObjectEntry) Marshal() (dAtA []byte, err error)

func (*LedgerObjectEntry) MarshalTo

func (m *LedgerObjectEntry) MarshalTo(dAtA []byte) (int, error)

func (*LedgerObjectEntry) MarshalToSizedBuffer

func (m *LedgerObjectEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LedgerObjectEntry) ProtoMessage

func (*LedgerObjectEntry) ProtoMessage()

func (*LedgerObjectEntry) Reset

func (m *LedgerObjectEntry) Reset()

func (*LedgerObjectEntry) Size

func (m *LedgerObjectEntry) Size() (n int)

func (*LedgerObjectEntry) String

func (m *LedgerObjectEntry) String() string

func (*LedgerObjectEntry) Unmarshal

func (m *LedgerObjectEntry) Unmarshal(dAtA []byte) error

func (*LedgerObjectEntry) XXX_DiscardUnknown

func (m *LedgerObjectEntry) XXX_DiscardUnknown()

func (*LedgerObjectEntry) XXX_Marshal

func (m *LedgerObjectEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LedgerObjectEntry) XXX_Merge

func (m *LedgerObjectEntry) XXX_Merge(src proto.Message)

func (*LedgerObjectEntry) XXX_Size

func (m *LedgerObjectEntry) XXX_Size() int

func (*LedgerObjectEntry) XXX_Unmarshal

func (m *LedgerObjectEntry) XXX_Unmarshal(b []byte) error

type LedgerStore

type LedgerStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

LedgerStore is an internal bookkeeper that maps ipfs cids to bucket and object names

func (*LedgerStore) AbortMultipartUpload

func (le *LedgerStore) AbortMultipartUpload(bucketName, multipartID string) error

AbortMultipartUpload is used to abort a multipart upload

func (*LedgerStore) AddObjectToBucket

func (le *LedgerStore) AddObjectToBucket(bucketName, objectName, objectHash string) error

AddObjectToBucket is used to update a ledger bucket entry with a new ledger object entry

func (*LedgerStore) BucketExists

func (le *LedgerStore) BucketExists(name string) bool

BucketExists is a public function to check if a bucket exists

func (*LedgerStore) Close

func (le *LedgerStore) Close() error

Close shuts down the ledger datastore

func (*LedgerStore) DeleteBucket

func (le *LedgerStore) DeleteBucket(name string) error

DeleteBucket is used to remove a ledger bucket entry

func (*LedgerStore) GetBucketHash

func (le *LedgerStore) GetBucketHash(name string) (string, error)

GetBucketHash is used to get the corresponding IPFS CID for a bucket

func (*LedgerStore) GetBucketNames

func (le *LedgerStore) GetBucketNames() ([]string, error)

GetBucketNames is used to a slice of all bucket names our ledger currently tracks

func (*LedgerStore) GetMultipartHashes

func (le *LedgerStore) GetMultipartHashes(bucket, multipartID string) ([]string, error)

GetMultipartHashes returns the hashes of all multipart upload object parts

func (*LedgerStore) GetObjectHash

func (le *LedgerStore) GetObjectHash(bucketName, objectName string) (string, error)

GetObjectHash is used to retrive the correspodning IPFS CID for an object

func (*LedgerStore) GetObjectHashes

func (le *LedgerStore) GetObjectHashes(bucket string) (map[string]string, error)

GetObjectHashes gets a map of object names to object hashes for all objects in a bucket

func (*LedgerStore) GetObjectParts

func (le *LedgerStore) GetObjectParts(id string) ([]ObjectPartInfo, error)

GetObjectParts is used to return multipart upload parts

func (*LedgerStore) IsEmptyBucket

func (le *LedgerStore) IsEmptyBucket(name string) error

IsEmptyBucket checks if a bucket is empty or not

func (*LedgerStore) MultipartIDExists

func (le *LedgerStore) MultipartIDExists(id string) error

MultipartIDExists is used to lookup if the given multipart id exists

func (*LedgerStore) NewBucket

func (le *LedgerStore) NewBucket(name, hash string) error

NewBucket creates a new ledger bucket entry

func (*LedgerStore) NewMultipartUpload

func (le *LedgerStore) NewMultipartUpload(bucketName, objectName, multipartID string) error

NewMultipartUpload is used to store the initial start of a multipart upload request

func (*LedgerStore) ObjectExists

func (le *LedgerStore) ObjectExists(bucketName, objectName string) error

ObjectExists is a public function to check if an object exists, and returns the reason the object can't be found if any

func (*LedgerStore) PutObjectPart

func (le *LedgerStore) PutObjectPart(bucketName, objectName, partHash, multipartID string, partNumber int64) error

PutObjectPart is used to record an individual object part within a multipart upload

func (*LedgerStore) RemoveObject

func (le *LedgerStore) RemoveObject(bucketName, objectName string) error

RemoveObject is used to remove a ledger object entry from a ledger bucket entry

func (*LedgerStore) UpdateBucketHash

func (le *LedgerStore) UpdateBucketHash(name, hash string) error

UpdateBucketHash is used to update the ledger bucket entry with a new IPFS hash

type MultipartUpload

type MultipartUpload struct {
	Bucket      string           `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Object      string           `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Id          string           `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	ObjectParts []ObjectPartInfo `protobuf:"bytes,4,rep,name=objectParts,proto3" json:"objectParts"`
}

func (*MultipartUpload) Descriptor

func (*MultipartUpload) Descriptor() ([]byte, []int)

func (*MultipartUpload) GetBucket

func (m *MultipartUpload) GetBucket() string

func (*MultipartUpload) GetId

func (m *MultipartUpload) GetId() string

func (*MultipartUpload) GetObject

func (m *MultipartUpload) GetObject() string

func (*MultipartUpload) GetObjectParts

func (m *MultipartUpload) GetObjectParts() []ObjectPartInfo

func (*MultipartUpload) Marshal

func (m *MultipartUpload) Marshal() (dAtA []byte, err error)

func (*MultipartUpload) MarshalTo

func (m *MultipartUpload) MarshalTo(dAtA []byte) (int, error)

func (*MultipartUpload) MarshalToSizedBuffer

func (m *MultipartUpload) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MultipartUpload) ProtoMessage

func (*MultipartUpload) ProtoMessage()

func (*MultipartUpload) Reset

func (m *MultipartUpload) Reset()

func (*MultipartUpload) Size

func (m *MultipartUpload) Size() (n int)

func (*MultipartUpload) String

func (m *MultipartUpload) String() string

func (*MultipartUpload) Unmarshal

func (m *MultipartUpload) Unmarshal(dAtA []byte) error

func (*MultipartUpload) XXX_DiscardUnknown

func (m *MultipartUpload) XXX_DiscardUnknown()

func (*MultipartUpload) XXX_Marshal

func (m *MultipartUpload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MultipartUpload) XXX_Merge

func (m *MultipartUpload) XXX_Merge(src proto.Message)

func (*MultipartUpload) XXX_Size

func (m *MultipartUpload) XXX_Size() int

func (*MultipartUpload) XXX_Unmarshal

func (m *MultipartUpload) XXX_Unmarshal(b []byte) error

type Object

type Object struct {
	DataHash   string     `protobuf:"bytes,1,opt,name=dataHash,proto3" json:"dataHash,omitempty"`
	ObjectInfo ObjectInfo `protobuf:"bytes,2,opt,name=objectInfo,proto3" json:"objectInfo"`
}

Object is a singular s3 object. the data field contains the actual data referred to by this object, while the objectInfo field is used to contain the information associated wth the object

func (*Object) Descriptor

func (*Object) Descriptor() ([]byte, []int)

func (*Object) GetDataHash

func (m *Object) GetDataHash() string

func (*Object) GetObjectInfo

func (m *Object) GetObjectInfo() ObjectInfo

func (*Object) Marshal

func (m *Object) Marshal() (dAtA []byte, err error)

func (*Object) MarshalTo

func (m *Object) MarshalTo(dAtA []byte) (int, error)

func (*Object) MarshalToSizedBuffer

func (m *Object) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Object) ProtoMessage

func (*Object) ProtoMessage()

func (*Object) Reset

func (m *Object) Reset()

func (*Object) Size

func (m *Object) Size() (n int)

func (*Object) String

func (m *Object) String() string

func (*Object) Unmarshal

func (m *Object) Unmarshal(dAtA []byte) error

func (*Object) XXX_DiscardUnknown

func (m *Object) XXX_DiscardUnknown()

func (*Object) XXX_Marshal

func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Object) XXX_Merge

func (m *Object) XXX_Merge(src proto.Message)

func (*Object) XXX_Size

func (m *Object) XXX_Size() int

func (*Object) XXX_Unmarshal

func (m *Object) XXX_Unmarshal(b []byte) error

type ObjectInfo

type ObjectInfo struct {
	Bucket             string            `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Name               string            `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ModTime            time.Time         `protobuf:"bytes,3,opt,name=modTime,proto3,stdtime" json:"modTime"`
	Size_              int64             `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	IsDir              bool              `protobuf:"varint,5,opt,name=isDir,proto3" json:"isDir,omitempty"`
	Etag               string            `protobuf:"bytes,6,opt,name=etag,proto3" json:"etag,omitempty"`
	ContentType        string            `protobuf:"bytes,7,opt,name=contentType,proto3" json:"contentType,omitempty"`
	ContentEncoding    string            `protobuf:"bytes,8,opt,name=contentEncoding,proto3" json:"contentEncoding,omitempty"`
	Expires            string            `protobuf:"bytes,9,opt,name=expires,proto3" json:"expires,omitempty"`
	StorageClass       string            `protobuf:"bytes,10,opt,name=storageClass,proto3" json:"storageClass,omitempty"`
	Parts              []ObjectPartInfo  `protobuf:"bytes,11,rep,name=parts,proto3" json:"parts"`
	UserDefined        map[string]string `` /* 164-byte string literal not displayed */
	MetadataOnly       bool              `protobuf:"varint,13,opt,name=metadataOnly,proto3" json:"metadataOnly,omitempty"`
	AccTime            *time.Time        `protobuf:"bytes,14,opt,name=accTime,proto3,stdtime" json:"accTime,omitempty"`
	BackendType        string            `protobuf:"bytes,15,opt,name=backendType,proto3" json:"backendType,omitempty"`
	ContentDisposition string            `protobuf:"bytes,16,opt,name=contentDisposition,proto3" json:"contentDisposition,omitempty"`
	ContentLanguage    string            `protobuf:"bytes,17,opt,name=contentLanguage,proto3" json:"contentLanguage,omitempty"`
}

ObjectInfo contains ifnormation about the object

func (*ObjectInfo) Descriptor

func (*ObjectInfo) Descriptor() ([]byte, []int)

func (*ObjectInfo) GetAccTime

func (m *ObjectInfo) GetAccTime() *time.Time

func (*ObjectInfo) GetBackendType

func (m *ObjectInfo) GetBackendType() string

func (*ObjectInfo) GetBucket

func (m *ObjectInfo) GetBucket() string

func (*ObjectInfo) GetContentDisposition

func (m *ObjectInfo) GetContentDisposition() string

func (*ObjectInfo) GetContentEncoding

func (m *ObjectInfo) GetContentEncoding() string

func (*ObjectInfo) GetContentLanguage

func (m *ObjectInfo) GetContentLanguage() string

func (*ObjectInfo) GetContentType

func (m *ObjectInfo) GetContentType() string

func (*ObjectInfo) GetEtag

func (m *ObjectInfo) GetEtag() string

func (*ObjectInfo) GetExpires

func (m *ObjectInfo) GetExpires() string

func (*ObjectInfo) GetIsDir

func (m *ObjectInfo) GetIsDir() bool

func (*ObjectInfo) GetMetadataOnly

func (m *ObjectInfo) GetMetadataOnly() bool

func (*ObjectInfo) GetModTime

func (m *ObjectInfo) GetModTime() time.Time

func (*ObjectInfo) GetName

func (m *ObjectInfo) GetName() string

func (*ObjectInfo) GetParts

func (m *ObjectInfo) GetParts() []ObjectPartInfo

func (*ObjectInfo) GetSize_

func (m *ObjectInfo) GetSize_() int64

func (*ObjectInfo) GetStorageClass

func (m *ObjectInfo) GetStorageClass() string

func (*ObjectInfo) GetUserDefined

func (m *ObjectInfo) GetUserDefined() map[string]string

func (*ObjectInfo) Marshal

func (m *ObjectInfo) Marshal() (dAtA []byte, err error)

func (*ObjectInfo) MarshalTo

func (m *ObjectInfo) MarshalTo(dAtA []byte) (int, error)

func (*ObjectInfo) MarshalToSizedBuffer

func (m *ObjectInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ObjectInfo) ProtoMessage

func (*ObjectInfo) ProtoMessage()

func (*ObjectInfo) Reset

func (m *ObjectInfo) Reset()

func (*ObjectInfo) Size

func (m *ObjectInfo) Size() (n int)

func (*ObjectInfo) String

func (m *ObjectInfo) String() string

func (*ObjectInfo) Unmarshal

func (m *ObjectInfo) Unmarshal(dAtA []byte) error

func (*ObjectInfo) XXX_DiscardUnknown

func (m *ObjectInfo) XXX_DiscardUnknown()

func (*ObjectInfo) XXX_Marshal

func (m *ObjectInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ObjectInfo) XXX_Merge

func (m *ObjectInfo) XXX_Merge(src proto.Message)

func (*ObjectInfo) XXX_Size

func (m *ObjectInfo) XXX_Size() int

func (*ObjectInfo) XXX_Unmarshal

func (m *ObjectInfo) XXX_Unmarshal(b []byte) error

type ObjectPartInfo

type ObjectPartInfo struct {
	// this should be an "int" type in Golang
	Number     int64  `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Etag       string `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"`
	Size_      int64  `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	ActualSize int64  `protobuf:"varint,5,opt,name=actualSize,proto3" json:"actualSize,omitempty"`
	// the hash of the data on ipfs
	// in the case of multipart uploads
	// this will refer to a unixfs object
	DataHash string `protobuf:"bytes,6,opt,name=dataHash,proto3" json:"dataHash,omitempty"`
}

ObjectPartInfo contains information an individual object client

func (*ObjectPartInfo) Descriptor

func (*ObjectPartInfo) Descriptor() ([]byte, []int)

func (*ObjectPartInfo) GetActualSize

func (m *ObjectPartInfo) GetActualSize() int64

func (*ObjectPartInfo) GetDataHash

func (m *ObjectPartInfo) GetDataHash() string

func (*ObjectPartInfo) GetEtag

func (m *ObjectPartInfo) GetEtag() string

func (*ObjectPartInfo) GetName

func (m *ObjectPartInfo) GetName() string

func (*ObjectPartInfo) GetNumber

func (m *ObjectPartInfo) GetNumber() int64

func (*ObjectPartInfo) GetSize_

func (m *ObjectPartInfo) GetSize_() int64

func (*ObjectPartInfo) Marshal

func (m *ObjectPartInfo) Marshal() (dAtA []byte, err error)

func (*ObjectPartInfo) MarshalTo

func (m *ObjectPartInfo) MarshalTo(dAtA []byte) (int, error)

func (*ObjectPartInfo) MarshalToSizedBuffer

func (m *ObjectPartInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ObjectPartInfo) ProtoMessage

func (*ObjectPartInfo) ProtoMessage()

func (*ObjectPartInfo) Reset

func (m *ObjectPartInfo) Reset()

func (*ObjectPartInfo) Size

func (m *ObjectPartInfo) Size() (n int)

func (*ObjectPartInfo) String

func (m *ObjectPartInfo) String() string

func (*ObjectPartInfo) Unmarshal

func (m *ObjectPartInfo) Unmarshal(dAtA []byte) error

func (*ObjectPartInfo) XXX_DiscardUnknown

func (m *ObjectPartInfo) XXX_DiscardUnknown()

func (*ObjectPartInfo) XXX_Marshal

func (m *ObjectPartInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ObjectPartInfo) XXX_Merge

func (m *ObjectPartInfo) XXX_Merge(src proto.Message)

func (*ObjectPartInfo) XXX_Size

func (m *ObjectPartInfo) XXX_Size() int

func (*ObjectPartInfo) XXX_Unmarshal

func (m *ObjectPartInfo) XXX_Unmarshal(b []byte) error

type TEMX

type TEMX struct {
	HTTPAddr string
	GRPCAddr string
	DSPath   string
	XAddr    string
	Insecure bool // whether or not we have an insecure connection to TemporalX
}

TEMX implements a MinIO gateway ontop of TemporalX

func (*TEMX) Name

func (g *TEMX) Name() string

Name returns the name of the TemporalX gateway backend

func (*TEMX) NewGatewayLayer

func (g *TEMX) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error)

NewGatewayLayer creates a minio gateway layer powered y TemporalX

func (*TEMX) Production

func (g *TEMX) Production() bool

Production indicates that this backend is suitable for production use

type UnimplementedInfoAPIServer

type UnimplementedInfoAPIServer struct {
}

UnimplementedInfoAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedInfoAPIServer) GetHash

Jump to

Keyboard shortcuts

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