Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)
- type File
- func (*File) Descriptor() ([]byte, []int)deprecated
- func (x *File) GetCreatedAt() string
- func (x *File) GetExt() string
- func (x *File) GetId() string
- func (x *File) GetMediaType() MediaType
- func (x *File) GetMimeType() string
- func (x *File) GetName() string
- func (x *File) GetNameIndex() string
- func (x *File) GetPath() string
- func (x *File) GetStatus() uint32
- func (*File) ProtoMessage()
- func (x *File) ProtoReflect() protoreflect.Message
- func (x *File) Reset()
- func (x *File) String() string
- type FileInfoRequest
- type FileInfoResponse
- func (*FileInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FileInfoResponse) GetCode() v1.Code
- func (x *FileInfoResponse) GetFile() *File
- func (x *FileInfoResponse) GetMessage() string
- func (*FileInfoResponse) ProtoMessage()
- func (x *FileInfoResponse) ProtoReflect() protoreflect.Message
- func (x *FileInfoResponse) Reset()
- func (x *FileInfoResponse) String() string
- type FileReferenceRequest
- func (*FileReferenceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FileReferenceRequest) GetId() string
- func (x *FileReferenceRequest) GetModule() string
- func (x *FileReferenceRequest) GetModuleRelationId() string
- func (x *FileReferenceRequest) GetModuleRelationName() string
- func (*FileReferenceRequest) ProtoMessage()
- func (x *FileReferenceRequest) ProtoReflect() protoreflect.Message
- func (x *FileReferenceRequest) Reset()
- func (x *FileReferenceRequest) String() string
- type FileReferenceResponse
- func (*FileReferenceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FileReferenceResponse) GetCode() v1.Code
- func (x *FileReferenceResponse) GetFile() *File
- func (x *FileReferenceResponse) GetMessage() string
- func (*FileReferenceResponse) ProtoMessage()
- func (x *FileReferenceResponse) ProtoReflect() protoreflect.Message
- func (x *FileReferenceResponse) Reset()
- func (x *FileReferenceResponse) String() string
- type FileServiceClient
- type FileServiceServer
- type MediaType
- type RevokeFileReferenceRequest
- func (*RevokeFileReferenceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RevokeFileReferenceRequest) GetId() string
- func (x *RevokeFileReferenceRequest) GetModule() string
- func (x *RevokeFileReferenceRequest) GetModuleRelationId() string
- func (*RevokeFileReferenceRequest) ProtoMessage()
- func (x *RevokeFileReferenceRequest) ProtoReflect() protoreflect.Message
- func (x *RevokeFileReferenceRequest) Reset()
- func (x *RevokeFileReferenceRequest) String() string
- type RevokeFileReferenceResponse
- func (*RevokeFileReferenceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RevokeFileReferenceResponse) GetCode() v1.Code
- func (x *RevokeFileReferenceResponse) GetMessage() string
- func (*RevokeFileReferenceResponse) ProtoMessage()
- func (x *RevokeFileReferenceResponse) ProtoReflect() protoreflect.Message
- func (x *RevokeFileReferenceResponse) Reset()
- func (x *RevokeFileReferenceResponse) String() string
- type UnimplementedFileServiceServer
- func (UnimplementedFileServiceServer) FileInfo(context.Context, *FileInfoRequest) (*FileInfoResponse, error)
- func (UnimplementedFileServiceServer) FileReference(context.Context, *FileReferenceRequest) (*FileReferenceResponse, error)
- func (UnimplementedFileServiceServer) Metadata(context.Context, *v1.MetadataRequest) (*v1.MetadataResponse, error)
- func (UnimplementedFileServiceServer) RevokeFileReference(context.Context, *RevokeFileReferenceRequest) (*RevokeFileReferenceResponse, error)
- type UnsafeFileServiceServer
Constants ¶
const ( FileService_Metadata_FullMethodName = "/v1.FileService/Metadata" FileService_FileInfo_FullMethodName = "/v1.FileService/FileInfo" FileService_FileReference_FullMethodName = "/v1.FileService/FileReference" FileService_RevokeFileReference_FullMethodName = "/v1.FileService/RevokeFileReference" )
Variables ¶
var ( MediaType_name = map[int32]string{ 0: "_", 1: "Image", 2: "Video", 3: "Audio", 4: "Document", } MediaType_value = map[string]int32{ "_": 0, "Image": 1, "Video": 2, "Audio": 3, "Document": 4, } )
Enum value maps for MediaType.
var FileService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.FileService", HandlerType: (*FileServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Metadata", Handler: _FileService_Metadata_Handler, }, { MethodName: "FileInfo", Handler: _FileService_FileInfo_Handler, }, { MethodName: "FileReference", Handler: _FileService_FileReference_Handler, }, { MethodName: "RevokeFileReference", Handler: _FileService_RevokeFileReference_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/file/v1/file.proto", }
FileService_ServiceDesc is the grpc.ServiceDesc for FileService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_file_v1_file_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFileServiceServer ¶
func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)
Types ¶
type File ¶
type File struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
MediaType MediaType `protobuf:"varint,2,opt,name=media_type,json=mediaType,proto3,enum=v1.MediaType" json:"media_type,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
NameIndex string `protobuf:"bytes,4,opt,name=name_index,json=nameIndex,proto3" json:"name_index,omitempty"`
Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"`
Ext string `protobuf:"bytes,6,opt,name=ext,proto3" json:"ext,omitempty"`
MimeType string `protobuf:"bytes,7,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
Status uint32 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"`
CreatedAt string `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// contains filtered or unexported fields
}
func (*File) Descriptor
deprecated
func (*File) GetCreatedAt ¶
func (*File) GetMediaType ¶
func (*File) GetMimeType ¶
func (*File) GetNameIndex ¶
func (*File) ProtoMessage ¶
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶
func (x *File) ProtoReflect() protoreflect.Message
type FileInfoRequest ¶
type FileInfoRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*FileInfoRequest) Descriptor
deprecated
func (*FileInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileInfoRequest.ProtoReflect.Descriptor instead.
func (*FileInfoRequest) GetId ¶
func (x *FileInfoRequest) GetId() string
func (*FileInfoRequest) ProtoMessage ¶
func (*FileInfoRequest) ProtoMessage()
func (*FileInfoRequest) ProtoReflect ¶
func (x *FileInfoRequest) ProtoReflect() protoreflect.Message
func (*FileInfoRequest) Reset ¶
func (x *FileInfoRequest) Reset()
func (*FileInfoRequest) String ¶
func (x *FileInfoRequest) String() string
type FileInfoResponse ¶
type FileInfoResponse struct {
Code v1.Code `protobuf:"varint,1,opt,name=code,proto3,enum=v1.Code" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
File *File `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"`
// contains filtered or unexported fields
}
func (*FileInfoResponse) Descriptor
deprecated
func (*FileInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use FileInfoResponse.ProtoReflect.Descriptor instead.
func (*FileInfoResponse) GetCode ¶
func (x *FileInfoResponse) GetCode() v1.Code
func (*FileInfoResponse) GetFile ¶
func (x *FileInfoResponse) GetFile() *File
func (*FileInfoResponse) GetMessage ¶
func (x *FileInfoResponse) GetMessage() string
func (*FileInfoResponse) ProtoMessage ¶
func (*FileInfoResponse) ProtoMessage()
func (*FileInfoResponse) ProtoReflect ¶
func (x *FileInfoResponse) ProtoReflect() protoreflect.Message
func (*FileInfoResponse) Reset ¶
func (x *FileInfoResponse) Reset()
func (*FileInfoResponse) String ¶
func (x *FileInfoResponse) String() string
type FileReferenceRequest ¶
type FileReferenceRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Module string `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` // 引用模块
ModuleRelationId string `protobuf:"bytes,3,opt,name=module_relation_id,json=moduleRelationId,proto3" json:"module_relation_id,omitempty"` // 引用模块关联的数据ID
ModuleRelationName string `protobuf:"bytes,4,opt,name=module_relation_name,json=moduleRelationName,proto3" json:"module_relation_name,omitempty"` // 引用 模块关联的数据名称
// contains filtered or unexported fields
}
func (*FileReferenceRequest) Descriptor
deprecated
func (*FileReferenceRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileReferenceRequest.ProtoReflect.Descriptor instead.
func (*FileReferenceRequest) GetId ¶
func (x *FileReferenceRequest) GetId() string
func (*FileReferenceRequest) GetModule ¶
func (x *FileReferenceRequest) GetModule() string
func (*FileReferenceRequest) GetModuleRelationId ¶
func (x *FileReferenceRequest) GetModuleRelationId() string
func (*FileReferenceRequest) GetModuleRelationName ¶
func (x *FileReferenceRequest) GetModuleRelationName() string
func (*FileReferenceRequest) ProtoMessage ¶
func (*FileReferenceRequest) ProtoMessage()
func (*FileReferenceRequest) ProtoReflect ¶
func (x *FileReferenceRequest) ProtoReflect() protoreflect.Message
func (*FileReferenceRequest) Reset ¶
func (x *FileReferenceRequest) Reset()
func (*FileReferenceRequest) String ¶
func (x *FileReferenceRequest) String() string
type FileReferenceResponse ¶
type FileReferenceResponse struct {
Code v1.Code `protobuf:"varint,1,opt,name=code,proto3,enum=v1.Code" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
File *File `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"`
// contains filtered or unexported fields
}
func (*FileReferenceResponse) Descriptor
deprecated
func (*FileReferenceResponse) Descriptor() ([]byte, []int)
Deprecated: Use FileReferenceResponse.ProtoReflect.Descriptor instead.
func (*FileReferenceResponse) GetCode ¶
func (x *FileReferenceResponse) GetCode() v1.Code
func (*FileReferenceResponse) GetFile ¶
func (x *FileReferenceResponse) GetFile() *File
func (*FileReferenceResponse) GetMessage ¶
func (x *FileReferenceResponse) GetMessage() string
func (*FileReferenceResponse) ProtoMessage ¶
func (*FileReferenceResponse) ProtoMessage()
func (*FileReferenceResponse) ProtoReflect ¶
func (x *FileReferenceResponse) ProtoReflect() protoreflect.Message
func (*FileReferenceResponse) Reset ¶
func (x *FileReferenceResponse) Reset()
func (*FileReferenceResponse) String ¶
func (x *FileReferenceResponse) String() string
type FileServiceClient ¶
type FileServiceClient interface {
// Metadata 获取服务元数据信息
Metadata(ctx context.Context, in *v1.MetadataRequest, opts ...grpc.CallOption) (*v1.MetadataResponse, error)
// FileInfo 获取文件信息
FileInfo(ctx context.Context, in *FileInfoRequest, opts ...grpc.CallOption) (*FileInfoResponse, error)
// FileReference 文件引用
FileReference(ctx context.Context, in *FileReferenceRequest, opts ...grpc.CallOption) (*FileReferenceResponse, error)
// RevokeFileReference 撤销文件引用
RevokeFileReference(ctx context.Context, in *RevokeFileReferenceRequest, opts ...grpc.CallOption) (*RevokeFileReferenceResponse, error)
}
FileServiceClient is the client API for FileService 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.
FileService 文件服务
func NewFileServiceClient ¶
func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient
type FileServiceServer ¶
type FileServiceServer interface {
// Metadata 获取服务元数据信息
Metadata(context.Context, *v1.MetadataRequest) (*v1.MetadataResponse, error)
// FileInfo 获取文件信息
FileInfo(context.Context, *FileInfoRequest) (*FileInfoResponse, error)
// FileReference 文件引用
FileReference(context.Context, *FileReferenceRequest) (*FileReferenceResponse, error)
// RevokeFileReference 撤销文件引用
RevokeFileReference(context.Context, *RevokeFileReferenceRequest) (*RevokeFileReferenceResponse, error)
// contains filtered or unexported methods
}
FileServiceServer is the server API for FileService service. All implementations must embed UnimplementedFileServiceServer for forward compatibility.
FileService 文件服务
type MediaType ¶
type MediaType int32
func (MediaType) Descriptor ¶
func (MediaType) Descriptor() protoreflect.EnumDescriptor
func (MediaType) EnumDescriptor
deprecated
func (MediaType) Number ¶
func (x MediaType) Number() protoreflect.EnumNumber
func (MediaType) Type ¶
func (MediaType) Type() protoreflect.EnumType
type RevokeFileReferenceRequest ¶
type RevokeFileReferenceRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Module string `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` // 引用模块
ModuleRelationId string `protobuf:"bytes,3,opt,name=module_relation_id,json=moduleRelationId,proto3" json:"module_relation_id,omitempty"` // 引用模块关联的数据ID
// contains filtered or unexported fields
}
func (*RevokeFileReferenceRequest) Descriptor
deprecated
func (*RevokeFileReferenceRequest) Descriptor() ([]byte, []int)
Deprecated: Use RevokeFileReferenceRequest.ProtoReflect.Descriptor instead.
func (*RevokeFileReferenceRequest) GetId ¶
func (x *RevokeFileReferenceRequest) GetId() string
func (*RevokeFileReferenceRequest) GetModule ¶
func (x *RevokeFileReferenceRequest) GetModule() string
func (*RevokeFileReferenceRequest) GetModuleRelationId ¶
func (x *RevokeFileReferenceRequest) GetModuleRelationId() string
func (*RevokeFileReferenceRequest) ProtoMessage ¶
func (*RevokeFileReferenceRequest) ProtoMessage()
func (*RevokeFileReferenceRequest) ProtoReflect ¶
func (x *RevokeFileReferenceRequest) ProtoReflect() protoreflect.Message
func (*RevokeFileReferenceRequest) Reset ¶
func (x *RevokeFileReferenceRequest) Reset()
func (*RevokeFileReferenceRequest) String ¶
func (x *RevokeFileReferenceRequest) String() string
type RevokeFileReferenceResponse ¶
type RevokeFileReferenceResponse struct {
Code v1.Code `protobuf:"varint,1,opt,name=code,proto3,enum=v1.Code" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*RevokeFileReferenceResponse) Descriptor
deprecated
func (*RevokeFileReferenceResponse) Descriptor() ([]byte, []int)
Deprecated: Use RevokeFileReferenceResponse.ProtoReflect.Descriptor instead.
func (*RevokeFileReferenceResponse) GetCode ¶
func (x *RevokeFileReferenceResponse) GetCode() v1.Code
func (*RevokeFileReferenceResponse) GetMessage ¶
func (x *RevokeFileReferenceResponse) GetMessage() string
func (*RevokeFileReferenceResponse) ProtoMessage ¶
func (*RevokeFileReferenceResponse) ProtoMessage()
func (*RevokeFileReferenceResponse) ProtoReflect ¶
func (x *RevokeFileReferenceResponse) ProtoReflect() protoreflect.Message
func (*RevokeFileReferenceResponse) Reset ¶
func (x *RevokeFileReferenceResponse) Reset()
func (*RevokeFileReferenceResponse) String ¶
func (x *RevokeFileReferenceResponse) String() string
type UnimplementedFileServiceServer ¶
type UnimplementedFileServiceServer struct{}
UnimplementedFileServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFileServiceServer) FileInfo ¶
func (UnimplementedFileServiceServer) FileInfo(context.Context, *FileInfoRequest) (*FileInfoResponse, error)
func (UnimplementedFileServiceServer) FileReference ¶
func (UnimplementedFileServiceServer) FileReference(context.Context, *FileReferenceRequest) (*FileReferenceResponse, error)
func (UnimplementedFileServiceServer) Metadata ¶
func (UnimplementedFileServiceServer) Metadata(context.Context, *v1.MetadataRequest) (*v1.MetadataResponse, error)
func (UnimplementedFileServiceServer) RevokeFileReference ¶
func (UnimplementedFileServiceServer) RevokeFileReference(context.Context, *RevokeFileReferenceRequest) (*RevokeFileReferenceResponse, error)
type UnsafeFileServiceServer ¶
type UnsafeFileServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileServiceServer will result in compilation errors.