import "github.com/docker/notary/trustmanager/remoteks"
Package remoteks is a generated protocol buffer package.
It is generated from these files:
keystore.proto
It has these top-level messages:
SetMsg FileNameMsg ByteMsg StringListMsg
client.go generator.go keystore.pb.go server.go
DefaultTimeout is the time a request will block waiting for a response from the server if no other timeout is configured.
func RegisterStoreServer(s *grpc.Server, srv StoreServer)
type ByteMsg struct { Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` }
type FileNameMsg struct { FileName string `protobuf:"bytes,1,opt,name=FileName" json:"FileName,omitempty"` }
func (*FileNameMsg) Descriptor() ([]byte, []int)
func (m *FileNameMsg) GetFileName() string
func (*FileNameMsg) ProtoMessage()
func (m *FileNameMsg) Reset()
func (m *FileNameMsg) String() string
type GRPCStorage struct {
// contains filtered or unexported fields
}
GRPCStorage is an implementer of the GRPC storage server. It passes through the requested operations to an underlying trustmanager.Storage instance, translating between the Go and GRPC interfaces.
func NewGRPCStorage(backend trustmanager.Storage) *GRPCStorage
NewGRPCStorage instantiates a new GRPC storage server using the provided backend.
func (s *GRPCStorage) Get(ctx context.Context, fn *FileNameMsg) (*ByteMsg, error)
Get returns the data associated with the provided identifier.
func (s *GRPCStorage) ListFiles(ctx context.Context, _ *google_protobuf.Empty) (*StringListMsg, error)
ListFiles returns all known identifiers in the storage backend.
func (s *GRPCStorage) Remove(ctx context.Context, fn *FileNameMsg) (*google_protobuf.Empty, error)
Remove deletes the data associated with the provided identifier.
func (s *GRPCStorage) Set(ctx context.Context, msg *SetMsg) (*google_protobuf.Empty, error)
Set writes the provided data under the given identifier.
type RemoteStore struct {
// contains filtered or unexported fields
}
RemoteStore is a wrapper around the GRPC storage client, translating between the Go and GRPC APIs.
func NewRemoteStore(server string, tlsConfig *tls.Config, timeout time.Duration) (*RemoteStore, error)
NewRemoteStore instantiates a RemoteStore.
func (s *RemoteStore) Get(fileName string) ([]byte, error)
Get returns the file content found at fileName relative to the base directory of the file store. Paths are expected to be cleaned server side.
func (s *RemoteStore) ListFiles() []string
ListFiles returns a list of paths relative to the base directory of the filestore. Any of these paths must be retrievable via the Storage.Get method.
func (s *RemoteStore) Location() string
Location returns a human readable indication of where the storage is located.
func (s *RemoteStore) Remove(fileName string) error
Remove deletes a file from the store relative to the store's base directory. Paths are expected to be cleaned server side.
func (s *RemoteStore) Set(fileName string, data []byte) error
Set stores the data using the provided fileName
type SetMsg struct { FileName string `protobuf:"bytes,1,opt,name=FileName" json:"FileName,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"` }
type StoreClient interface { Set(ctx context.Context, in *SetMsg, opts ...grpc.CallOption) (*google_protobuf.Empty, error) Remove(ctx context.Context, in *FileNameMsg, opts ...grpc.CallOption) (*google_protobuf.Empty, error) Get(ctx context.Context, in *FileNameMsg, opts ...grpc.CallOption) (*ByteMsg, error) ListFiles(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*StringListMsg, error) }
func NewStoreClient(cc *grpc.ClientConn) StoreClient
type StoreServer interface { Set(context.Context, *SetMsg) (*google_protobuf.Empty, error) Remove(context.Context, *FileNameMsg) (*google_protobuf.Empty, error) Get(context.Context, *FileNameMsg) (*ByteMsg, error) ListFiles(context.Context, *google_protobuf.Empty) (*StringListMsg, error) }
type StringListMsg struct { FileNames []string `protobuf:"bytes,1,rep,name=FileNames" json:"FileNames,omitempty"` }
func (*StringListMsg) Descriptor() ([]byte, []int)
func (m *StringListMsg) GetFileNames() []string
func (*StringListMsg) ProtoMessage()
func (m *StringListMsg) Reset()
func (m *StringListMsg) String() string
Package remoteks imports 11 packages (graph). Updated 2018-07-29. Refresh now. Tools for package owners.