v1

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_api_v1_file_manager_service_proto protoreflect.FileDescriptor
View Source
var FilesInternalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmoperator.files.server.v1.FilesInternalService",
	HandlerType: (*FilesInternalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFilePath",
			Handler:    _FilesInternalService_GetFilePath_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/file_manager_service.proto",
}

FilesInternalService_ServiceDesc is the grpc.ServiceDesc for FilesInternalService 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 FilesService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmoperator.files.server.v1.FilesService",
	HandlerType: (*FilesServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListFiles",
			Handler:    _FilesService_ListFiles_Handler,
		},
		{
			MethodName: "GetFile",
			Handler:    _FilesService_GetFile_Handler,
		},
		{
			MethodName: "DeleteFile",
			Handler:    _FilesService_DeleteFile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/file_manager_service.proto",
}

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

Functions

func RegisterFilesInternalServiceServer added in v0.2.0

func RegisterFilesInternalServiceServer(s grpc.ServiceRegistrar, srv FilesInternalServiceServer)

func RegisterFilesServiceHandler

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

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

func RegisterFilesServiceHandlerClient

func RegisterFilesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FilesServiceClient) error

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

func RegisterFilesServiceHandlerFromEndpoint

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

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

func RegisterFilesServiceHandlerServer

func RegisterFilesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FilesServiceServer) error

RegisterFilesServiceHandlerServer registers the http handlers for service FilesService to "mux". UnaryRPC :call FilesServiceServer 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 RegisterFilesServiceHandlerFromEndpoint instead.

func RegisterFilesServiceServer

func RegisterFilesServiceServer(s grpc.ServiceRegistrar, srv FilesServiceServer)

Types

type DeleteFileRequest

type DeleteFileRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteFileRequest) Descriptor deprecated

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

Deprecated: Use DeleteFileRequest.ProtoReflect.Descriptor instead.

func (*DeleteFileRequest) GetId

func (x *DeleteFileRequest) GetId() string

func (*DeleteFileRequest) ProtoMessage

func (*DeleteFileRequest) ProtoMessage()

func (*DeleteFileRequest) ProtoReflect

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

func (*DeleteFileRequest) Reset

func (x *DeleteFileRequest) Reset()

func (*DeleteFileRequest) String

func (x *DeleteFileRequest) String() string

type DeleteFileResponse

type DeleteFileResponse struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Object  string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Deleted bool   `protobuf:"varint,3,opt,name=deleted,proto3" json:"deleted,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteFileResponse) Descriptor deprecated

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

Deprecated: Use DeleteFileResponse.ProtoReflect.Descriptor instead.

func (*DeleteFileResponse) GetDeleted

func (x *DeleteFileResponse) GetDeleted() bool

func (*DeleteFileResponse) GetId

func (x *DeleteFileResponse) GetId() string

func (*DeleteFileResponse) GetObject

func (x *DeleteFileResponse) GetObject() string

func (*DeleteFileResponse) ProtoMessage

func (*DeleteFileResponse) ProtoMessage()

func (*DeleteFileResponse) ProtoReflect

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

func (*DeleteFileResponse) Reset

func (x *DeleteFileResponse) Reset()

func (*DeleteFileResponse) String

func (x *DeleteFileResponse) String() string

type File

type File struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Bytes     int64  `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
	CreatedAt int64  `protobuf:"varint,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	Filename  string `protobuf:"bytes,4,opt,name=filename,proto3" json:"filename,omitempty"`
	Object    string `protobuf:"bytes,5,opt,name=object,proto3" json:"object,omitempty"`
	Purpose   string `protobuf:"bytes,6,opt,name=purpose,proto3" json:"purpose,omitempty"`
	// contains filtered or unexported fields
}

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetBytes

func (x *File) GetBytes() int64

func (*File) GetCreatedAt

func (x *File) GetCreatedAt() int64

func (*File) GetFilename

func (x *File) GetFilename() string

func (*File) GetId

func (x *File) GetId() string

func (*File) GetObject

func (x *File) GetObject() string

func (*File) GetPurpose

func (x *File) GetPurpose() string

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 FilesInternalServiceClient added in v0.2.0

type FilesInternalServiceClient interface {
	GetFilePath(ctx context.Context, in *GetFilePathRequest, opts ...grpc.CallOption) (*GetFilePathResponse, error)
}

FilesInternalServiceClient is the client API for FilesInternalService 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 NewFilesInternalServiceClient added in v0.2.0

func NewFilesInternalServiceClient(cc grpc.ClientConnInterface) FilesInternalServiceClient

type FilesInternalServiceServer added in v0.2.0

type FilesInternalServiceServer interface {
	GetFilePath(context.Context, *GetFilePathRequest) (*GetFilePathResponse, error)
	// contains filtered or unexported methods
}

FilesInternalServiceServer is the server API for FilesInternalService service. All implementations must embed UnimplementedFilesInternalServiceServer for forward compatibility

type FilesServiceClient

type FilesServiceClient interface {
	ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error)
	GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*File, error)
	DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*DeleteFileResponse, error)
}

FilesServiceClient is the client API for FilesService 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.

type FilesServiceServer

type FilesServiceServer interface {
	ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error)
	GetFile(context.Context, *GetFileRequest) (*File, error)
	DeleteFile(context.Context, *DeleteFileRequest) (*DeleteFileResponse, error)
	// contains filtered or unexported methods
}

FilesServiceServer is the server API for FilesService service. All implementations must embed UnimplementedFilesServiceServer for forward compatibility

type GetFilePathRequest added in v0.2.0

type GetFilePathRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFilePathRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetFilePathRequest.ProtoReflect.Descriptor instead.

func (*GetFilePathRequest) GetId added in v0.2.0

func (x *GetFilePathRequest) GetId() string

func (*GetFilePathRequest) ProtoMessage added in v0.2.0

func (*GetFilePathRequest) ProtoMessage()

func (*GetFilePathRequest) ProtoReflect added in v0.2.0

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

func (*GetFilePathRequest) Reset added in v0.2.0

func (x *GetFilePathRequest) Reset()

func (*GetFilePathRequest) String added in v0.2.0

func (x *GetFilePathRequest) String() string

type GetFilePathResponse added in v0.2.0

type GetFilePathResponse struct {
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFilePathResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use GetFilePathResponse.ProtoReflect.Descriptor instead.

func (*GetFilePathResponse) GetPath added in v0.2.0

func (x *GetFilePathResponse) GetPath() string

func (*GetFilePathResponse) ProtoMessage added in v0.2.0

func (*GetFilePathResponse) ProtoMessage()

func (*GetFilePathResponse) ProtoReflect added in v0.2.0

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

func (*GetFilePathResponse) Reset added in v0.2.0

func (x *GetFilePathResponse) Reset()

func (*GetFilePathResponse) String added in v0.2.0

func (x *GetFilePathResponse) String() string

type GetFileRequest

type GetFileRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFileRequest) Descriptor deprecated

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

Deprecated: Use GetFileRequest.ProtoReflect.Descriptor instead.

func (*GetFileRequest) GetId

func (x *GetFileRequest) GetId() string

func (*GetFileRequest) ProtoMessage

func (*GetFileRequest) ProtoMessage()

func (*GetFileRequest) ProtoReflect

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

func (*GetFileRequest) Reset

func (x *GetFileRequest) Reset()

func (*GetFileRequest) String

func (x *GetFileRequest) String() string

type ListFilesRequest

type ListFilesRequest struct {
	Purpose string `protobuf:"bytes,1,opt,name=purpose,proto3" json:"purpose,omitempty"`
	// contains filtered or unexported fields
}

func (*ListFilesRequest) Descriptor deprecated

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

Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead.

func (*ListFilesRequest) GetPurpose

func (x *ListFilesRequest) GetPurpose() string

func (*ListFilesRequest) ProtoMessage

func (*ListFilesRequest) ProtoMessage()

func (*ListFilesRequest) ProtoReflect

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

func (*ListFilesRequest) Reset

func (x *ListFilesRequest) Reset()

func (*ListFilesRequest) String

func (x *ListFilesRequest) String() string

type ListFilesResponse

type ListFilesResponse struct {
	Object string  `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"`
	Data   []*File `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ListFilesResponse) Descriptor deprecated

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

Deprecated: Use ListFilesResponse.ProtoReflect.Descriptor instead.

func (*ListFilesResponse) GetData

func (x *ListFilesResponse) GetData() []*File

func (*ListFilesResponse) GetObject

func (x *ListFilesResponse) GetObject() string

func (*ListFilesResponse) ProtoMessage

func (*ListFilesResponse) ProtoMessage()

func (*ListFilesResponse) ProtoReflect

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

func (*ListFilesResponse) Reset

func (x *ListFilesResponse) Reset()

func (*ListFilesResponse) String

func (x *ListFilesResponse) String() string

type UnimplementedFilesInternalServiceServer added in v0.2.0

type UnimplementedFilesInternalServiceServer struct {
}

UnimplementedFilesInternalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFilesInternalServiceServer) GetFilePath added in v0.2.0

type UnimplementedFilesServiceServer

type UnimplementedFilesServiceServer struct {
}

UnimplementedFilesServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFilesServiceServer) DeleteFile

func (UnimplementedFilesServiceServer) GetFile

func (UnimplementedFilesServiceServer) ListFiles

type UnsafeFilesInternalServiceServer added in v0.2.0

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

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

type UnsafeFilesServiceServer

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

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

Jump to

Keyboard shortcuts

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