notary: github.com/docker/notary/trustmanager/remoteks Index | Files

package remoteks

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

Index

Package Files

client.go generator.go keystore.pb.go server.go

Constants

const DefaultTimeout = time.Second * 30

DefaultTimeout is the time a request will block waiting for a response from the server if no other timeout is configured.

func RegisterStoreServer Uses

func RegisterStoreServer(s *grpc.Server, srv StoreServer)

type ByteMsg Uses

type ByteMsg struct {
    Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"`
}

func (*ByteMsg) Descriptor Uses

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

func (*ByteMsg) GetData Uses

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

func (*ByteMsg) ProtoMessage Uses

func (*ByteMsg) ProtoMessage()

func (*ByteMsg) Reset Uses

func (m *ByteMsg) Reset()

func (*ByteMsg) String Uses

func (m *ByteMsg) String() string

type FileNameMsg Uses

type FileNameMsg struct {
    FileName string `protobuf:"bytes,1,opt,name=FileName" json:"FileName,omitempty"`
}

func (*FileNameMsg) Descriptor Uses

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

func (*FileNameMsg) GetFileName Uses

func (m *FileNameMsg) GetFileName() string

func (*FileNameMsg) ProtoMessage Uses

func (*FileNameMsg) ProtoMessage()

func (*FileNameMsg) Reset Uses

func (m *FileNameMsg) Reset()

func (*FileNameMsg) String Uses

func (m *FileNameMsg) String() string

type GRPCStorage Uses

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 Uses

func NewGRPCStorage(backend trustmanager.Storage) *GRPCStorage

NewGRPCStorage instantiates a new GRPC storage server using the provided backend.

func (*GRPCStorage) Get Uses

func (s *GRPCStorage) Get(ctx context.Context, fn *FileNameMsg) (*ByteMsg, error)

Get returns the data associated with the provided identifier.

func (*GRPCStorage) ListFiles Uses

func (s *GRPCStorage) ListFiles(ctx context.Context, _ *google_protobuf.Empty) (*StringListMsg, error)

ListFiles returns all known identifiers in the storage backend.

func (*GRPCStorage) Remove Uses

func (s *GRPCStorage) Remove(ctx context.Context, fn *FileNameMsg) (*google_protobuf.Empty, error)

Remove deletes the data associated with the provided identifier.

func (*GRPCStorage) Set Uses

func (s *GRPCStorage) Set(ctx context.Context, msg *SetMsg) (*google_protobuf.Empty, error)

Set writes the provided data under the given identifier.

type RemoteStore Uses

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 Uses

func NewRemoteStore(server string, tlsConfig *tls.Config, timeout time.Duration) (*RemoteStore, error)

NewRemoteStore instantiates a RemoteStore.

func (*RemoteStore) Get Uses

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 (*RemoteStore) ListFiles Uses

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 (*RemoteStore) Location Uses

func (s *RemoteStore) Location() string

Location returns a human readable indication of where the storage is located.

func (*RemoteStore) Remove Uses

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 (*RemoteStore) Set Uses

func (s *RemoteStore) Set(fileName string, data []byte) error

Set stores the data using the provided fileName

type SetMsg Uses

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"`
}

func (*SetMsg) Descriptor Uses

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

func (*SetMsg) GetData Uses

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

func (*SetMsg) GetFileName Uses

func (m *SetMsg) GetFileName() string

func (*SetMsg) ProtoMessage Uses

func (*SetMsg) ProtoMessage()

func (*SetMsg) Reset Uses

func (m *SetMsg) Reset()

func (*SetMsg) String Uses

func (m *SetMsg) String() string

type StoreClient Uses

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 Uses

func NewStoreClient(cc *grpc.ClientConn) StoreClient

type StoreServer Uses

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 Uses

type StringListMsg struct {
    FileNames []string `protobuf:"bytes,1,rep,name=FileNames" json:"FileNames,omitempty"`
}

func (*StringListMsg) Descriptor Uses

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

func (*StringListMsg) GetFileNames Uses

func (m *StringListMsg) GetFileNames() []string

func (*StringListMsg) ProtoMessage Uses

func (*StringListMsg) ProtoMessage()

func (*StringListMsg) Reset Uses

func (m *StringListMsg) Reset()

func (*StringListMsg) String Uses

func (m *StringListMsg) String() string

Package remoteks imports 11 packages (graph). Updated 2018-07-29. Refresh now. Tools for package owners.