v1

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 16 Imported by: 3

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: "llmariner.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: "llmariner.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,
		},
		{
			MethodName: "CreateFileFromObjectPath",
			Handler:    _FilesService_CreateFileFromObjectPath_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)

View Source
var FilesWorkerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmariner.files.server.v1.FilesWorkerService",
	HandlerType: (*FilesWorkerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFilePath",
			Handler:    _FilesWorkerService_GetFilePath_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/file_manager_service.proto",
}

FilesWorkerService_ServiceDesc is the grpc.ServiceDesc for FilesWorkerService 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

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)

func RegisterFilesWorkerServiceServer

func RegisterFilesWorkerServiceServer(s grpc.ServiceRegistrar, srv FilesWorkerServiceServer)

Types

type CreateFileFromObjectPathRequest added in v1.3.0

type CreateFileFromObjectPathRequest struct {

	// The object path is the path to the object in the object storage. The path must start from "s3://".
	ObjectPath string `protobuf:"bytes,1,opt,name=object_path,json=objectPath,proto3" json:"object_path,omitempty"`
	Purpose    string `protobuf:"bytes,2,opt,name=purpose,proto3" json:"purpose,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateFileFromObjectPathRequest) Descriptor deprecated added in v1.3.0

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

Deprecated: Use CreateFileFromObjectPathRequest.ProtoReflect.Descriptor instead.

func (*CreateFileFromObjectPathRequest) GetObjectPath added in v1.3.0

func (x *CreateFileFromObjectPathRequest) GetObjectPath() string

func (*CreateFileFromObjectPathRequest) GetPurpose added in v1.3.0

func (x *CreateFileFromObjectPathRequest) GetPurpose() string

func (*CreateFileFromObjectPathRequest) ProtoMessage added in v1.3.0

func (*CreateFileFromObjectPathRequest) ProtoMessage()

func (*CreateFileFromObjectPathRequest) ProtoReflect added in v1.3.0

func (*CreateFileFromObjectPathRequest) Reset added in v1.3.0

func (*CreateFileFromObjectPathRequest) String added in v1.3.0

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"`
	// object_store_path is the path to the object in the object storage. This is not in the OpenAI API spec,
	// but it is convenient for end users especiallly when they create a file with the CreateFileFromObjectPath RPC call.
	//
	// If the path starts with "s3://", it is the full path including the bucket name.
	// Otherwise, path is the relative path to the bucket that is configured with job-manager-dispatcher.
	ObjectStorePath string `protobuf:"bytes,7,opt,name=object_store_path,json=objectStorePath,proto3" json:"object_store_path,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) GetObjectStorePath added in v1.7.0

func (x *File) GetObjectStorePath() 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

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.

type FilesInternalServiceServer

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)
	// CreateFileFromObjectPath creates a file from the object path in the object storage without
	// actually uploading the file. This is mainly added to allow the worker cluster to access
	// files without giving the access privilege to the object storage to the control plane.
	CreateFileFromObjectPath(ctx context.Context, in *CreateFileFromObjectPathRequest, opts ...grpc.CallOption) (*File, 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)
	// CreateFileFromObjectPath creates a file from the object path in the object storage without
	// actually uploading the file. This is mainly added to allow the worker cluster to access
	// files without giving the access privilege to the object storage to the control plane.
	CreateFileFromObjectPath(context.Context, *CreateFileFromObjectPathRequest) (*File, error)
	// contains filtered or unexported methods
}

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

type FilesWorkerServiceClient

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

FilesWorkerServiceClient is the client API for FilesWorkerService 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 FilesWorkerServiceServer

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

FilesWorkerServiceServer is the server API for FilesWorkerService service. All implementations must embed UnimplementedFilesWorkerServiceServer for forward compatibility

type GetFilePathRequest

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

func (*GetFilePathRequest) Descriptor deprecated

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

Deprecated: Use GetFilePathRequest.ProtoReflect.Descriptor instead.

func (*GetFilePathRequest) GetId

func (x *GetFilePathRequest) GetId() string

func (*GetFilePathRequest) ProtoMessage

func (*GetFilePathRequest) ProtoMessage()

func (*GetFilePathRequest) ProtoReflect

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

func (*GetFilePathRequest) Reset

func (x *GetFilePathRequest) Reset()

func (*GetFilePathRequest) String

func (x *GetFilePathRequest) String() string

type GetFilePathResponse

type GetFilePathResponse struct {

	// Path to the file in the object storage. If the path starts with "s3://", it is the full path including the bucket name.
	// Otherwise, path is the relative path to the bucket that is configured with job-manager-dispatcher.
	Path     string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFilePathResponse) Descriptor deprecated

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

Deprecated: Use GetFilePathResponse.ProtoReflect.Descriptor instead.

func (*GetFilePathResponse) GetFilename

func (x *GetFilePathResponse) GetFilename() string

func (*GetFilePathResponse) GetPath

func (x *GetFilePathResponse) GetPath() string

func (*GetFilePathResponse) ProtoMessage

func (*GetFilePathResponse) ProtoMessage()

func (*GetFilePathResponse) ProtoReflect

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

func (*GetFilePathResponse) Reset

func (x *GetFilePathResponse) Reset()

func (*GetFilePathResponse) String

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 is used to filter the files by their purpose. Optional.
	Purpose string `protobuf:"bytes,1,opt,name=purpose,proto3" json:"purpose,omitempty"`
	// after is the identifier for the last job from the previous pagination request.
	After string `protobuf:"bytes,2,opt,name=after,proto3" json:"after,omitempty"`
	// limit is the number of fine-tuning jobs to retrieve. Defaults to 20.
	Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// order is set to either 'asc' or 'desc' to sort objects by their created_at timestamp.
	Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"`
	// contains filtered or unexported fields
}

func (*ListFilesRequest) Descriptor deprecated

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

Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead.

func (*ListFilesRequest) GetAfter added in v1.4.0

func (x *ListFilesRequest) GetAfter() string

func (*ListFilesRequest) GetLimit added in v1.4.0

func (x *ListFilesRequest) GetLimit() int32

func (*ListFilesRequest) GetOrder added in v1.4.0

func (x *ListFilesRequest) GetOrder() string

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"`
	HasMore bool    `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
	// total_items is the total number of batch jobs. This is not defined in the
	// OpenAI API spec, but we include here for better UX in the frontend.
	TotalItems int32 `protobuf:"varint,4,opt,name=total_items,json=totalItems,proto3" json:"total_items,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) GetHasMore added in v1.4.0

func (x *ListFilesResponse) GetHasMore() bool

func (*ListFilesResponse) GetObject

func (x *ListFilesResponse) GetObject() string

func (*ListFilesResponse) GetTotalItems added in v1.4.0

func (x *ListFilesResponse) GetTotalItems() int32

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

type UnimplementedFilesInternalServiceServer struct {
}

UnimplementedFilesInternalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFilesInternalServiceServer) GetFilePath

type UnimplementedFilesServiceServer

type UnimplementedFilesServiceServer struct {
}

UnimplementedFilesServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFilesServiceServer) CreateFileFromObjectPath added in v1.3.0

func (UnimplementedFilesServiceServer) DeleteFile

func (UnimplementedFilesServiceServer) GetFile

func (UnimplementedFilesServiceServer) ListFiles

type UnimplementedFilesWorkerServiceServer

type UnimplementedFilesWorkerServiceServer struct {
}

UnimplementedFilesWorkerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFilesWorkerServiceServer) GetFilePath

type UnsafeFilesInternalServiceServer

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.

type UnsafeFilesWorkerServiceServer

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

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

Jump to

Keyboard shortcuts

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