storageclient

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteOptions

type DeleteOptions struct {
	Bucket string
	Key    string
}

type DeleteResult

type DeleteResult struct{}

Empty response for forwards compatibility

type NitricStorageClient

type NitricStorageClient struct {
	// contains filtered or unexported fields
}

func (*NitricStorageClient) Delete

func (s *NitricStorageClient) Delete(opts *DeleteOptions) (*DeleteResult, error)

func (*NitricStorageClient) Read

func (s *NitricStorageClient) Read(opts *ReadOptions) (*ReadResult, error)

Get - retrieves an exist item from a bucket by its key

func (*NitricStorageClient) Write

func (s *NitricStorageClient) Write(opts *WriteOptions) (*WriteResult, error)

Put - stores an item in a bucket under the given key.

type ReadOptions

type ReadOptions struct {
	Bucket string
	Key    string
}

type ReadResult

type ReadResult struct {
	Data []byte
}

type StorageClient

type StorageClient interface {
	Read(*ReadOptions) (*ReadResult, error)
	Write(*WriteOptions) (*WriteResult, error)
	Delete(*DeleteOptions) (*DeleteResult, error)
}

func NewStorageClient

func NewStorageClient(conn *grpc.ClientConn) StorageClient

func NewWithClient

func NewWithClient(client v1.StorageClient) StorageClient

type WriteOptions

type WriteOptions struct {
	Bucket string
	Key    string
	Data   []byte
}

type WriteResult

type WriteResult struct{}

Empty response for forwards compatibility

Jump to

Keyboard shortcuts

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