datasetv1

package
v0.0.0-...-e27afb6 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package datasetv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var DatasetAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "aetherfs.dataset.v1.DatasetAPI",
	HandlerType: (*DatasetAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _DatasetAPI_List_Handler,
		},
		{
			MethodName: "ListTags",
			Handler:    _DatasetAPI_ListTags_Handler,
		},
		{
			MethodName: "Lookup",
			Handler:    _DatasetAPI_Lookup_Handler,
		},
		{
			MethodName: "Publish",
			Handler:    _DatasetAPI_Publish_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _DatasetAPI_Subscribe_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "aetherfs/dataset/v1/api.proto",
}

DatasetAPI_ServiceDesc is the grpc.ServiceDesc for DatasetAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_aetherfs_dataset_v1_api_proto protoreflect.FileDescriptor
View Source
var File_aetherfs_dataset_v1_dataset_proto protoreflect.FileDescriptor
View Source
var File_aetherfs_dataset_v1_file_proto protoreflect.FileDescriptor
View Source
var File_aetherfs_dataset_v1_tag_proto protoreflect.FileDescriptor

Functions

func RegisterDatasetAPIHandler

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

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

func RegisterDatasetAPIHandlerClient

func RegisterDatasetAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DatasetAPIClient) error

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

func RegisterDatasetAPIHandlerFromEndpoint

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

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

func RegisterDatasetAPIHandlerServer

func RegisterDatasetAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DatasetAPIServer) error

RegisterDatasetAPIHandlerServer registers the http handlers for service DatasetAPI to "mux". UnaryRPC :call DatasetAPIServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDatasetAPIHandlerFromEndpoint instead.

func RegisterDatasetAPIServer

func RegisterDatasetAPIServer(s grpc.ServiceRegistrar, srv DatasetAPIServer)

Types

type Dataset

type Dataset struct {
	Files     []*File  `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`                           // manifest of files within the dataset
	BlockSize int32    `protobuf:"varint,2,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"` // maximum size of the blocks in bytes
	Blocks    []string `protobuf:"bytes,3,rep,name=blocks,proto3" json:"blocks,omitempty"`                         // a list of block signatures
	// contains filtered or unexported fields
}

Dataset describes a collection of data that is spread across multiple files. Files in a dataset are broken into blocks to make caching and sharing parts easier.

func (*Dataset) Descriptor deprecated

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

Deprecated: Use Dataset.ProtoReflect.Descriptor instead.

func (*Dataset) GetBlockSize

func (x *Dataset) GetBlockSize() int32

func (*Dataset) GetBlocks

func (x *Dataset) GetBlocks() []string

func (*Dataset) GetFiles

func (x *Dataset) GetFiles() []*File

func (*Dataset) ProtoMessage

func (*Dataset) ProtoMessage()

func (*Dataset) ProtoReflect

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

func (*Dataset) Reset

func (x *Dataset) Reset()

func (*Dataset) String

func (x *Dataset) String() string

type DatasetAPIClient

type DatasetAPIClient interface {
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error)
	Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
	Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error)
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (DatasetAPI_SubscribeClient, error)
}

DatasetAPIClient is the client API for DatasetAPI 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 NewDatasetAPIClient

func NewDatasetAPIClient(cc grpc.ClientConnInterface) DatasetAPIClient

type DatasetAPIServer

type DatasetAPIServer interface {
	List(context.Context, *ListRequest) (*ListResponse, error)
	ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error)
	Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
	Publish(context.Context, *PublishRequest) (*PublishResponse, error)
	Subscribe(DatasetAPI_SubscribeServer) error
	// contains filtered or unexported methods
}

DatasetAPIServer is the server API for DatasetAPI service. All implementations must embed UnimplementedDatasetAPIServer for forward compatibility

type DatasetAPI_SubscribeClient

type DatasetAPI_SubscribeClient interface {
	Send(*SubscribeRequest) error
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type DatasetAPI_SubscribeServer

type DatasetAPI_SubscribeServer interface {
	Send(*SubscribeResponse) error
	Recv() (*SubscribeRequest, error)
	grpc.ServerStream
}

type File

type File struct {
	Name         string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                                     // name of the file (including directories)
	Size         int64                  `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`                                    // size in bytes
	LastModified *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"` // time of last modification
	// contains filtered or unexported fields
}

File describes a filesystem file that is replicated using AetherFS.

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetLastModified

func (x *File) GetLastModified() *timestamppb.Timestamp

func (*File) GetName

func (x *File) GetName() string

func (*File) GetSize

func (x *File) GetSize() int64

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

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

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type ListRequest

type ListRequest struct {
	PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // the token used to manage pagination.
	PageSize  int32  `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`   // the number of results to include in the page.
	// contains filtered or unexported fields
}

ListRequest lists all datasets the authenticated user has access to.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetPageSize

func (x *ListRequest) GetPageSize() int32

func (*ListRequest) GetPageToken

func (x *ListRequest) GetPageToken() string

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 {
	NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // the token associated with the start of the next page.
	Datasets      []*Tag `protobuf:"bytes,2,rep,name=datasets,proto3" json:"datasets,omitempty"`                                  // the list of datasets for the current page.
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetDatasets

func (x *ListResponse) GetDatasets() []*Tag

func (*ListResponse) GetNextPageToken

func (x *ListResponse) GetNextPageToken() string

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 ListTagsRequest

type ListTagsRequest struct {
	Name      string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`                            // the name of the dataset.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // the token used to manage pagination.
	PageSize  int32  `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`   // the number of results to include in the page.
	// contains filtered or unexported fields
}

ListTagsRequest lists all tags for a given dataset the authenticated user as access to.

func (*ListTagsRequest) Descriptor deprecated

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

Deprecated: Use ListTagsRequest.ProtoReflect.Descriptor instead.

func (*ListTagsRequest) GetName

func (x *ListTagsRequest) GetName() string

func (*ListTagsRequest) GetPageSize

func (x *ListTagsRequest) GetPageSize() int32

func (*ListTagsRequest) GetPageToken

func (x *ListTagsRequest) GetPageToken() string

func (*ListTagsRequest) ProtoMessage

func (*ListTagsRequest) ProtoMessage()

func (*ListTagsRequest) ProtoReflect

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

func (*ListTagsRequest) Reset

func (x *ListTagsRequest) Reset()

func (*ListTagsRequest) String

func (x *ListTagsRequest) String() string

type ListTagsResponse

type ListTagsResponse struct {
	NextPageToken string `protobuf:"bytes,1,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // the token associated with the start of the next page.
	Tags          []*Tag `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`                                          // the list of tags for the current page.
	// contains filtered or unexported fields
}

func (*ListTagsResponse) Descriptor deprecated

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

Deprecated: Use ListTagsResponse.ProtoReflect.Descriptor instead.

func (*ListTagsResponse) GetNextPageToken

func (x *ListTagsResponse) GetNextPageToken() string

func (*ListTagsResponse) GetTags

func (x *ListTagsResponse) GetTags() []*Tag

func (*ListTagsResponse) ProtoMessage

func (*ListTagsResponse) ProtoMessage()

func (*ListTagsResponse) ProtoReflect

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

func (*ListTagsResponse) Reset

func (x *ListTagsResponse) Reset()

func (*ListTagsResponse) String

func (x *ListTagsResponse) String() string

type LookupRequest

type LookupRequest struct {
	Tag *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

LookupRequest resolves the dataset information for a given tag.

func (*LookupRequest) Descriptor deprecated

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

Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.

func (*LookupRequest) GetTag

func (x *LookupRequest) GetTag() *Tag

func (*LookupRequest) ProtoMessage

func (*LookupRequest) ProtoMessage()

func (*LookupRequest) ProtoReflect

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

func (*LookupRequest) Reset

func (x *LookupRequest) Reset()

func (*LookupRequest) String

func (x *LookupRequest) String() string

type LookupResponse

type LookupResponse struct {
	Dataset *Dataset `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"`
	// contains filtered or unexported fields
}

func (*LookupResponse) Descriptor deprecated

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

Deprecated: Use LookupResponse.ProtoReflect.Descriptor instead.

func (*LookupResponse) GetDataset

func (x *LookupResponse) GetDataset() *Dataset

func (*LookupResponse) ProtoMessage

func (*LookupResponse) ProtoMessage()

func (*LookupResponse) ProtoReflect

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

func (*LookupResponse) Reset

func (x *LookupResponse) Reset()

func (*LookupResponse) String

func (x *LookupResponse) String() string

type PublishRequest

type PublishRequest struct {
	Dataset *Dataset `protobuf:"bytes,1,opt,name=dataset,proto3" json:"dataset,omitempty"`
	Tags    []*Tag   `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

PublishRequest updates all provided tags to use the new version of dataset.

func (*PublishRequest) Descriptor deprecated

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

Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.

func (*PublishRequest) GetDataset

func (x *PublishRequest) GetDataset() *Dataset

func (*PublishRequest) GetTags

func (x *PublishRequest) GetTags() []*Tag

func (*PublishRequest) ProtoMessage

func (*PublishRequest) ProtoMessage()

func (*PublishRequest) ProtoReflect

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

func (*PublishRequest) Reset

func (x *PublishRequest) Reset()

func (*PublishRequest) String

func (x *PublishRequest) String() string

type PublishResponse

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

PublishResponse

func (*PublishResponse) Descriptor deprecated

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

Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.

func (*PublishResponse) ProtoMessage

func (*PublishResponse) ProtoMessage()

func (*PublishResponse) ProtoReflect

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

func (*PublishResponse) Reset

func (x *PublishResponse) Reset()

func (*PublishResponse) String

func (x *PublishResponse) String() string

type SubscribeRequest

type SubscribeRequest struct {
	Tag    *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	Cancel bool `protobuf:"varint,2,opt,name=cancel,proto3" json:"cancel,omitempty"`
	// contains filtered or unexported fields
}

SubscribeRequest instructs the agent to subscribe to a dataset at some scope.

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetCancel

func (x *SubscribeRequest) GetCancel() bool

func (*SubscribeRequest) GetTag

func (x *SubscribeRequest) GetTag() *Tag

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeResponse

type SubscribeResponse struct {
	Tag     *Tag     `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	Dataset *Dataset `protobuf:"bytes,2,opt,name=dataset,proto3" json:"dataset,omitempty"`
	// contains filtered or unexported fields
}

SubscribeResponse is returned any time a new version of a dataset becomes available.

func (*SubscribeResponse) Descriptor deprecated

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

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) GetDataset

func (x *SubscribeResponse) GetDataset() *Dataset

func (*SubscribeResponse) GetTag

func (x *SubscribeResponse) GetTag() *Tag

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

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

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) String() string

type Tag

type Tag struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`       // name and optional scope of the dataset (example: @scope/name)
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // the version of the dataset (example: qa, prod, latest, v21.09, etc)
	// contains filtered or unexported fields
}

Tag identifies a version of a dataset in AetherFS.

func (*Tag) Descriptor deprecated

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

Deprecated: Use Tag.ProtoReflect.Descriptor instead.

func (*Tag) GetName

func (x *Tag) GetName() string

func (*Tag) GetVersion

func (x *Tag) GetVersion() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) ProtoReflect

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

func (*Tag) Reset

func (x *Tag) Reset()

func (*Tag) String

func (x *Tag) String() string

type UnimplementedDatasetAPIServer

type UnimplementedDatasetAPIServer struct {
}

UnimplementedDatasetAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedDatasetAPIServer) List

func (UnimplementedDatasetAPIServer) ListTags

func (UnimplementedDatasetAPIServer) Lookup

func (UnimplementedDatasetAPIServer) Publish

func (UnimplementedDatasetAPIServer) Subscribe

type UnsafeDatasetAPIServer

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

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

Jump to

Keyboard shortcuts

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