Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAssetsServer(s grpc.ServiceRegistrar, srv AssetsServer)
- type AssetsClient
- type AssetsServer
- type AssetsService
- type File
- type FileUploadRequest
- func (*FileUploadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FileUploadRequest) GetFile() []byte
- func (x *FileUploadRequest) GetGameName() string
- func (x *FileUploadRequest) GetName() string
- func (*FileUploadRequest) ProtoMessage()
- func (x *FileUploadRequest) ProtoReflect() protoreflect.Message
- func (x *FileUploadRequest) Reset()
- func (x *FileUploadRequest) String() string
- type FileUploadResponse
- func (*FileUploadResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FileUploadResponse) GetMessage() string
- func (x *FileUploadResponse) GetName() string
- func (x *FileUploadResponse) GetSize() uint32
- func (*FileUploadResponse) ProtoMessage()
- func (x *FileUploadResponse) ProtoReflect() protoreflect.Message
- func (x *FileUploadResponse) Reset()
- func (x *FileUploadResponse) String() string
- type Manifest
- type UnimplementedAssetsServer
- type UnsafeAssetsServer
Constants ¶
const ( Assets_GetManifest_FullMethodName = "/content.service.v2.Assets/GetManifest" Assets_FileUpload_FullMethodName = "/content.service.v2.Assets/FileUpload" )
Variables ¶
var Assets_ServiceDesc = grpc.ServiceDesc{ ServiceName: "content.service.v2.Assets", HandlerType: (*AssetsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetManifest", Handler: _Assets_GetManifest_Handler, }, { MethodName: "FileUpload", Handler: _Assets_FileUpload_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "content/v2/assets.proto", }
Assets_ServiceDesc is the grpc.ServiceDesc for Assets service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_content_v2_assets_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAssetsServer ¶
func RegisterAssetsServer(s grpc.ServiceRegistrar, srv AssetsServer)
Types ¶
type AssetsClient ¶
type AssetsClient interface { GetManifest(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Manifest, error) FileUpload(ctx context.Context, in *FileUploadRequest, opts ...grpc.CallOption) (*FileUploadResponse, error) }
AssetsClient is the client API for Assets 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 NewAssetsClient ¶
func NewAssetsClient(cc grpc.ClientConnInterface) AssetsClient
type AssetsServer ¶
type AssetsServer interface { GetManifest(context.Context, *emptypb.Empty) (*Manifest, error) FileUpload(context.Context, *FileUploadRequest) (*FileUploadResponse, error) // contains filtered or unexported methods }
AssetsServer is the server API for Assets service. All implementations must embed UnimplementedAssetsServer for forward compatibility
type AssetsService ¶
type AssetsService struct { UnimplementedAssetsServer // contains filtered or unexported fields }
func NewAssetsService ¶
func NewAssetsService(assetsDir string) *AssetsService
func (*AssetsService) FileUpload ¶
func (s *AssetsService) FileUpload(ctx context.Context, req *FileUploadRequest) (*FileUploadResponse, error)
func (*AssetsService) GetManifest ¶
type File ¶
type File struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Checksum uint32 `protobuf:"varint,2,opt,name=checksum,proto3" json:"checksum,omitempty"` Compressed int64 `protobuf:"varint,3,opt,name=compressed,proto3" json:"compressed,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
func (*File) GetChecksum ¶
func (*File) GetCompressed ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileUploadRequest ¶
type FileUploadRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` GameName string `protobuf:"bytes,2,opt,name=game_name,json=gameName,proto3" json:"game_name,omitempty"` File []byte `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` // contains filtered or unexported fields }
func (*FileUploadRequest) Descriptor
deprecated
func (*FileUploadRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileUploadRequest.ProtoReflect.Descriptor instead.
func (*FileUploadRequest) GetFile ¶
func (x *FileUploadRequest) GetFile() []byte
func (*FileUploadRequest) GetGameName ¶
func (x *FileUploadRequest) GetGameName() string
func (*FileUploadRequest) GetName ¶
func (x *FileUploadRequest) GetName() string
func (*FileUploadRequest) ProtoMessage ¶
func (*FileUploadRequest) ProtoMessage()
func (*FileUploadRequest) ProtoReflect ¶
func (x *FileUploadRequest) ProtoReflect() protoreflect.Message
func (*FileUploadRequest) Reset ¶
func (x *FileUploadRequest) Reset()
func (*FileUploadRequest) String ¶
func (x *FileUploadRequest) String() string
type FileUploadResponse ¶
type FileUploadResponse struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Size uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*FileUploadResponse) Descriptor
deprecated
func (*FileUploadResponse) Descriptor() ([]byte, []int)
Deprecated: Use FileUploadResponse.ProtoReflect.Descriptor instead.
func (*FileUploadResponse) GetMessage ¶
func (x *FileUploadResponse) GetMessage() string
func (*FileUploadResponse) GetName ¶
func (x *FileUploadResponse) GetName() string
func (*FileUploadResponse) GetSize ¶
func (x *FileUploadResponse) GetSize() uint32
func (*FileUploadResponse) ProtoMessage ¶
func (*FileUploadResponse) ProtoMessage()
func (*FileUploadResponse) ProtoReflect ¶
func (x *FileUploadResponse) ProtoReflect() protoreflect.Message
func (*FileUploadResponse) Reset ¶
func (x *FileUploadResponse) Reset()
func (*FileUploadResponse) String ¶
func (x *FileUploadResponse) String() string
type Manifest ¶
type Manifest struct { Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` // contains filtered or unexported fields }
func (*Manifest) Descriptor
deprecated
func (*Manifest) ProtoMessage ¶
func (*Manifest) ProtoMessage()
func (*Manifest) ProtoReflect ¶
func (x *Manifest) ProtoReflect() protoreflect.Message
type UnimplementedAssetsServer ¶
type UnimplementedAssetsServer struct { }
UnimplementedAssetsServer must be embedded to have forward compatible implementations.
func (UnimplementedAssetsServer) FileUpload ¶
func (UnimplementedAssetsServer) FileUpload(context.Context, *FileUploadRequest) (*FileUploadResponse, error)
func (UnimplementedAssetsServer) GetManifest ¶
type UnsafeAssetsServer ¶
type UnsafeAssetsServer interface {
// contains filtered or unexported methods
}
UnsafeAssetsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AssetsServer will result in compilation errors.