file

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterFilesServer

func RegisterFilesServer(s grpc.ServiceRegistrar, srv FilesServer)

Types

type Cursor

type Cursor struct {
	After string                 `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"`
	AsOf  *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=as_of,json=asOf,proto3" json:"as_of,omitempty"`
	// contains filtered or unexported fields
}

A Cursor should be treated as an opaque value by clients. It is not subject to any API compatibility guarantees.

func (*Cursor) Descriptor deprecated

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

Deprecated: Use Cursor.ProtoReflect.Descriptor instead.

func (*Cursor) GetAfter

func (x *Cursor) GetAfter() string

func (*Cursor) GetAsOf

func (x *Cursor) GetAsOf() *timestamppb.Timestamp

func (*Cursor) ProtoMessage

func (*Cursor) ProtoMessage()

func (*Cursor) ProtoReflect

func (x *Cursor) ProtoReflect() protoreflect.Message

func (*Cursor) Reset

func (x *Cursor) Reset()

func (*Cursor) String

func (x *Cursor) String() string

type DeleteRequest

type DeleteRequest struct {
	Tenant *tenant.ID `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"`
	Path   string     `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetPath

func (x *DeleteRequest) GetPath() string

func (*DeleteRequest) GetTenant

func (x *DeleteRequest) GetTenant() *tenant.ID

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type FilesClient

type FilesClient interface {
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	// A Retrieve call returns a server-relative URL path to retrieve the
	// contents of the requested file.
	//
	// This endpoint can be used by a trusted controller process to
	// distribute files to workers, without having to delegate access to
	// the individual workers.
	Retrieve(ctx context.Context, in *RetrievalRequest, opts ...grpc.CallOption) (*RetrievalResponse, error)
}

FilesClient is the client API for Files service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewFilesClient

func NewFilesClient(cc grpc.ClientConnInterface) FilesClient

type FilesServer

type FilesServer interface {
	Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
	List(context.Context, *ListRequest) (*ListResponse, error)
	// A Retrieve call returns a server-relative URL path to retrieve the
	// contents of the requested file.
	//
	// This endpoint can be used by a trusted controller process to
	// distribute files to workers, without having to delegate access to
	// the individual workers.
	Retrieve(context.Context, *RetrievalRequest) (*RetrievalResponse, error)
	// contains filtered or unexported methods
}

FilesServer is the server API for Files service. All implementations must embed UnimplementedFilesServer for forward compatibility

type ListRequest

type ListRequest struct {
	Tenant *tenant.ID `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"`
	Path   string     `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// A cursor from a previous ListResponse.
	Cursor *Cursor `protobuf:"bytes,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetCursor

func (x *ListRequest) GetCursor() *Cursor

func (*ListRequest) GetPath

func (x *ListRequest) GetPath() string

func (*ListRequest) GetTenant

func (x *ListRequest) GetTenant() *tenant.ID

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Files  []*Meta `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	Cursor *Cursor `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
	// contains filtered or unexported fields
}

A ListResponse returns a page of results and a durable Cursor to retrieve the next page.

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetCursor

func (x *ListResponse) GetCursor() *Cursor

func (*ListResponse) GetFiles

func (x *ListResponse) GetFiles() []*Meta

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type Meta

type Meta struct {
	Tenant     *tenant.ID             `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"`
	Path       string                 `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Version    int64                  `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	CreatedAt  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"`
	Meta       map[string]string      `` /* 149-byte string literal not displayed */
	Size       int64                  `protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*Meta) Descriptor deprecated

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

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetCreatedAt

func (x *Meta) GetCreatedAt() *timestamppb.Timestamp

func (*Meta) GetMeta

func (x *Meta) GetMeta() map[string]string

func (*Meta) GetModifiedAt

func (x *Meta) GetModifiedAt() *timestamppb.Timestamp

func (*Meta) GetPath

func (x *Meta) GetPath() string

func (*Meta) GetSize

func (x *Meta) GetSize() int64

func (*Meta) GetTenant

func (x *Meta) GetTenant() *tenant.ID

func (*Meta) GetVersion

func (x *Meta) GetVersion() int64

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect

func (x *Meta) ProtoReflect() protoreflect.Message

func (*Meta) Reset

func (x *Meta) Reset()

func (*Meta) String

func (x *Meta) String() string

type RetrievalRequest

type RetrievalRequest struct {
	Tenant *tenant.ID `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"`
	Path   string     `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// If non-zero, the request will be restricted to a specific version
	// of the file.
	Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	// If present, restricts the validity of the returned retrieval path.
	ValidFor *durationpb.Duration `protobuf:"bytes,4,opt,name=valid_for,json=validFor,proto3" json:"valid_for,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrievalRequest) Descriptor deprecated

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

Deprecated: Use RetrievalRequest.ProtoReflect.Descriptor instead.

func (*RetrievalRequest) GetPath

func (x *RetrievalRequest) GetPath() string

func (*RetrievalRequest) GetTenant

func (x *RetrievalRequest) GetTenant() *tenant.ID

func (*RetrievalRequest) GetValidFor

func (x *RetrievalRequest) GetValidFor() *durationpb.Duration

func (*RetrievalRequest) GetVersion

func (x *RetrievalRequest) GetVersion() int64

func (*RetrievalRequest) ProtoMessage

func (*RetrievalRequest) ProtoMessage()

func (*RetrievalRequest) ProtoReflect

func (x *RetrievalRequest) ProtoReflect() protoreflect.Message

func (*RetrievalRequest) Reset

func (x *RetrievalRequest) Reset()

func (*RetrievalRequest) String

func (x *RetrievalRequest) String() string

type RetrievalResponse

type RetrievalResponse struct {

	// A server-relative HTTP GET request to retrieve the data. This URI
	// will contain an authentication token that permits access to the
	// file's contents; the subsequent request need not be otherwise
	// authenticated.
	GetUri string `protobuf:"bytes,1,opt,name=get_uri,json=getUri,proto3" json:"get_uri,omitempty"`
	// If present, the expiration time of the token.
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// The metadata of the requested file.
	Meta *Meta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

func (*RetrievalResponse) Descriptor deprecated

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

Deprecated: Use RetrievalResponse.ProtoReflect.Descriptor instead.

func (*RetrievalResponse) GetExpiresAt

func (x *RetrievalResponse) GetExpiresAt() *timestamppb.Timestamp

func (*RetrievalResponse) GetGetUri

func (x *RetrievalResponse) GetGetUri() string

func (*RetrievalResponse) GetMeta

func (x *RetrievalResponse) GetMeta() *Meta

func (*RetrievalResponse) ProtoMessage

func (*RetrievalResponse) ProtoMessage()

func (*RetrievalResponse) ProtoReflect

func (x *RetrievalResponse) ProtoReflect() protoreflect.Message

func (*RetrievalResponse) Reset

func (x *RetrievalResponse) Reset()

func (*RetrievalResponse) String

func (x *RetrievalResponse) String() string

type UnimplementedFilesServer

type UnimplementedFilesServer struct {
}

UnimplementedFilesServer must be embedded to have forward compatible implementations.

func (UnimplementedFilesServer) Delete

func (UnimplementedFilesServer) List

func (UnimplementedFilesServer) Retrieve

type UnsafeFilesServer

type UnsafeFilesServer interface {
	// contains filtered or unexported methods
}

UnsafeFilesServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FilesServer will result in compilation errors.

Jump to

Keyboard shortcuts

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