Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUsersInternalServiceServer(s grpc.ServiceRegistrar, srv UsersInternalServiceServer)
- func RegisterUsersServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUsersServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersServiceClient) error
- func RegisterUsersServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUsersServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsersServiceServer) error
- func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer)
- type APIKey
- func (*APIKey) Descriptor() ([]byte, []int)deprecated
- func (x *APIKey) GetCreatedAt() int64
- func (x *APIKey) GetId() string
- func (x *APIKey) GetName() string
- func (x *APIKey) GetObject() string
- func (x *APIKey) GetSecret() string
- func (*APIKey) ProtoMessage()
- func (x *APIKey) ProtoReflect() protoreflect.Message
- func (x *APIKey) Reset()
- func (x *APIKey) String() string
- type CreateAPIKeyRequest
- func (*CreateAPIKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAPIKeyRequest) GetName() string
- func (*CreateAPIKeyRequest) ProtoMessage()
- func (x *CreateAPIKeyRequest) ProtoReflect() protoreflect.Message
- func (x *CreateAPIKeyRequest) Reset()
- func (x *CreateAPIKeyRequest) String() string
- type DeleteAPIKeyRequest
- func (*DeleteAPIKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteAPIKeyRequest) GetId() string
- func (*DeleteAPIKeyRequest) ProtoMessage()
- func (x *DeleteAPIKeyRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteAPIKeyRequest) Reset()
- func (x *DeleteAPIKeyRequest) String() string
- type DeleteAPIKeyResponse
- func (*DeleteAPIKeyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteAPIKeyResponse) GetDeleted() bool
- func (x *DeleteAPIKeyResponse) GetId() string
- func (x *DeleteAPIKeyResponse) GetObject() string
- func (*DeleteAPIKeyResponse) ProtoMessage()
- func (x *DeleteAPIKeyResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteAPIKeyResponse) Reset()
- func (x *DeleteAPIKeyResponse) String() string
- type ListAPIKeysRequest
- type ListAPIKeysResponse
- func (*ListAPIKeysResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAPIKeysResponse) GetData() []*APIKey
- func (x *ListAPIKeysResponse) GetObject() string
- func (*ListAPIKeysResponse) ProtoMessage()
- func (x *ListAPIKeysResponse) ProtoReflect() protoreflect.Message
- func (x *ListAPIKeysResponse) Reset()
- func (x *ListAPIKeysResponse) String() string
- type UnimplementedUsersInternalServiceServer
- type UnimplementedUsersServiceServer
- func (UnimplementedUsersServiceServer) CreateAPIKey(context.Context, *CreateAPIKeyRequest) (*APIKey, error)
- func (UnimplementedUsersServiceServer) DeleteAPIKey(context.Context, *DeleteAPIKeyRequest) (*DeleteAPIKeyResponse, error)
- func (UnimplementedUsersServiceServer) ListAPIKeys(context.Context, *ListAPIKeysRequest) (*ListAPIKeysResponse, error)
- type UnsafeUsersInternalServiceServer
- type UnsafeUsersServiceServer
- type UsersInternalServiceClient
- type UsersInternalServiceServer
- type UsersServiceClient
- type UsersServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_v1_user_manager_service_proto protoreflect.FileDescriptor
var UsersInternalService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "llmoperator.users.server.v1.UsersInternalService", HandlerType: (*UsersInternalServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListAPIKeys", Handler: _UsersInternalService_ListAPIKeys_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/user_manager_service.proto", }
UsersInternalService_ServiceDesc is the grpc.ServiceDesc for UsersInternalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UsersService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "llmoperator.users.server.v1.UsersService", HandlerType: (*UsersServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateAPIKey", Handler: _UsersService_CreateAPIKey_Handler, }, { MethodName: "ListAPIKeys", Handler: _UsersService_ListAPIKeys_Handler, }, { MethodName: "DeleteAPIKey", Handler: _UsersService_DeleteAPIKey_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/user_manager_service.proto", }
UsersService_ServiceDesc is the grpc.ServiceDesc for UsersService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUsersInternalServiceServer ¶
func RegisterUsersInternalServiceServer(s grpc.ServiceRegistrar, srv UsersInternalServiceServer)
func RegisterUsersServiceHandler ¶
func RegisterUsersServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUsersServiceHandler registers the http handlers for service UsersService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUsersServiceHandlerClient ¶
func RegisterUsersServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UsersServiceClient) error
RegisterUsersServiceHandlerClient registers the http handlers for service UsersService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UsersServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UsersServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UsersServiceClient" to call the correct interceptors.
func RegisterUsersServiceHandlerFromEndpoint ¶
func RegisterUsersServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUsersServiceHandlerFromEndpoint is same as RegisterUsersServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUsersServiceHandlerServer ¶
func RegisterUsersServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UsersServiceServer) error
RegisterUsersServiceHandlerServer registers the http handlers for service UsersService to "mux". UnaryRPC :call UsersServiceServer 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 RegisterUsersServiceHandlerFromEndpoint instead.
func RegisterUsersServiceServer ¶
func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer)
Types ¶
type APIKey ¶
type APIKey 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"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// secret is populated only when a new API key is created.
Secret string `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"`
CreatedAt int64 `protobuf:"varint,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// contains filtered or unexported fields
}
func (*APIKey) Descriptor
deprecated
func (*APIKey) GetCreatedAt ¶
func (*APIKey) ProtoMessage ¶
func (*APIKey) ProtoMessage()
func (*APIKey) ProtoReflect ¶
func (x *APIKey) ProtoReflect() protoreflect.Message
type CreateAPIKeyRequest ¶
type CreateAPIKeyRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*CreateAPIKeyRequest) Descriptor
deprecated
func (*CreateAPIKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateAPIKeyRequest.ProtoReflect.Descriptor instead.
func (*CreateAPIKeyRequest) GetName ¶
func (x *CreateAPIKeyRequest) GetName() string
func (*CreateAPIKeyRequest) ProtoMessage ¶
func (*CreateAPIKeyRequest) ProtoMessage()
func (*CreateAPIKeyRequest) ProtoReflect ¶
func (x *CreateAPIKeyRequest) ProtoReflect() protoreflect.Message
func (*CreateAPIKeyRequest) Reset ¶
func (x *CreateAPIKeyRequest) Reset()
func (*CreateAPIKeyRequest) String ¶
func (x *CreateAPIKeyRequest) String() string
type DeleteAPIKeyRequest ¶
type DeleteAPIKeyRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteAPIKeyRequest) Descriptor
deprecated
func (*DeleteAPIKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteAPIKeyRequest.ProtoReflect.Descriptor instead.
func (*DeleteAPIKeyRequest) GetId ¶
func (x *DeleteAPIKeyRequest) GetId() string
func (*DeleteAPIKeyRequest) ProtoMessage ¶
func (*DeleteAPIKeyRequest) ProtoMessage()
func (*DeleteAPIKeyRequest) ProtoReflect ¶
func (x *DeleteAPIKeyRequest) ProtoReflect() protoreflect.Message
func (*DeleteAPIKeyRequest) Reset ¶
func (x *DeleteAPIKeyRequest) Reset()
func (*DeleteAPIKeyRequest) String ¶
func (x *DeleteAPIKeyRequest) String() string
type DeleteAPIKeyResponse ¶
type DeleteAPIKeyResponse 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 (*DeleteAPIKeyResponse) Descriptor
deprecated
func (*DeleteAPIKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteAPIKeyResponse.ProtoReflect.Descriptor instead.
func (*DeleteAPIKeyResponse) GetDeleted ¶
func (x *DeleteAPIKeyResponse) GetDeleted() bool
func (*DeleteAPIKeyResponse) GetId ¶
func (x *DeleteAPIKeyResponse) GetId() string
func (*DeleteAPIKeyResponse) GetObject ¶
func (x *DeleteAPIKeyResponse) GetObject() string
func (*DeleteAPIKeyResponse) ProtoMessage ¶
func (*DeleteAPIKeyResponse) ProtoMessage()
func (*DeleteAPIKeyResponse) ProtoReflect ¶
func (x *DeleteAPIKeyResponse) ProtoReflect() protoreflect.Message
func (*DeleteAPIKeyResponse) Reset ¶
func (x *DeleteAPIKeyResponse) Reset()
func (*DeleteAPIKeyResponse) String ¶
func (x *DeleteAPIKeyResponse) String() string
type ListAPIKeysRequest ¶
type ListAPIKeysRequest struct {
// contains filtered or unexported fields
}
func (*ListAPIKeysRequest) Descriptor
deprecated
func (*ListAPIKeysRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAPIKeysRequest.ProtoReflect.Descriptor instead.
func (*ListAPIKeysRequest) ProtoMessage ¶
func (*ListAPIKeysRequest) ProtoMessage()
func (*ListAPIKeysRequest) ProtoReflect ¶
func (x *ListAPIKeysRequest) ProtoReflect() protoreflect.Message
func (*ListAPIKeysRequest) Reset ¶
func (x *ListAPIKeysRequest) Reset()
func (*ListAPIKeysRequest) String ¶
func (x *ListAPIKeysRequest) String() string
type ListAPIKeysResponse ¶
type ListAPIKeysResponse struct {
Object string `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"`
Data []*APIKey `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*ListAPIKeysResponse) Descriptor
deprecated
func (*ListAPIKeysResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAPIKeysResponse.ProtoReflect.Descriptor instead.
func (*ListAPIKeysResponse) GetData ¶
func (x *ListAPIKeysResponse) GetData() []*APIKey
func (*ListAPIKeysResponse) GetObject ¶
func (x *ListAPIKeysResponse) GetObject() string
func (*ListAPIKeysResponse) ProtoMessage ¶
func (*ListAPIKeysResponse) ProtoMessage()
func (*ListAPIKeysResponse) ProtoReflect ¶
func (x *ListAPIKeysResponse) ProtoReflect() protoreflect.Message
func (*ListAPIKeysResponse) Reset ¶
func (x *ListAPIKeysResponse) Reset()
func (*ListAPIKeysResponse) String ¶
func (x *ListAPIKeysResponse) String() string
type UnimplementedUsersInternalServiceServer ¶
type UnimplementedUsersInternalServiceServer struct {
}
UnimplementedUsersInternalServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersInternalServiceServer) ListAPIKeys ¶
func (UnimplementedUsersInternalServiceServer) ListAPIKeys(context.Context, *ListAPIKeysRequest) (*ListAPIKeysResponse, error)
type UnimplementedUsersServiceServer ¶
type UnimplementedUsersServiceServer struct {
}
UnimplementedUsersServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUsersServiceServer) CreateAPIKey ¶
func (UnimplementedUsersServiceServer) CreateAPIKey(context.Context, *CreateAPIKeyRequest) (*APIKey, error)
func (UnimplementedUsersServiceServer) DeleteAPIKey ¶
func (UnimplementedUsersServiceServer) DeleteAPIKey(context.Context, *DeleteAPIKeyRequest) (*DeleteAPIKeyResponse, error)
func (UnimplementedUsersServiceServer) ListAPIKeys ¶
func (UnimplementedUsersServiceServer) ListAPIKeys(context.Context, *ListAPIKeysRequest) (*ListAPIKeysResponse, error)
type UnsafeUsersInternalServiceServer ¶
type UnsafeUsersInternalServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUsersInternalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersInternalServiceServer will result in compilation errors.
type UnsafeUsersServiceServer ¶
type UnsafeUsersServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUsersServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UsersServiceServer will result in compilation errors.
type UsersInternalServiceClient ¶
type UsersInternalServiceClient interface {
ListAPIKeys(ctx context.Context, in *ListAPIKeysRequest, opts ...grpc.CallOption) (*ListAPIKeysResponse, error)
}
UsersInternalServiceClient is the client API for UsersInternalService 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 NewUsersInternalServiceClient ¶
func NewUsersInternalServiceClient(cc grpc.ClientConnInterface) UsersInternalServiceClient
type UsersInternalServiceServer ¶
type UsersInternalServiceServer interface {
ListAPIKeys(context.Context, *ListAPIKeysRequest) (*ListAPIKeysResponse, error)
// contains filtered or unexported methods
}
UsersInternalServiceServer is the server API for UsersInternalService service. All implementations must embed UnimplementedUsersInternalServiceServer for forward compatibility
type UsersServiceClient ¶
type UsersServiceClient interface {
CreateAPIKey(ctx context.Context, in *CreateAPIKeyRequest, opts ...grpc.CallOption) (*APIKey, error)
ListAPIKeys(ctx context.Context, in *ListAPIKeysRequest, opts ...grpc.CallOption) (*ListAPIKeysResponse, error)
DeleteAPIKey(ctx context.Context, in *DeleteAPIKeyRequest, opts ...grpc.CallOption) (*DeleteAPIKeyResponse, error)
}
UsersServiceClient is the client API for UsersService 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 NewUsersServiceClient ¶
func NewUsersServiceClient(cc grpc.ClientConnInterface) UsersServiceClient
type UsersServiceServer ¶
type UsersServiceServer interface {
CreateAPIKey(context.Context, *CreateAPIKeyRequest) (*APIKey, error)
ListAPIKeys(context.Context, *ListAPIKeysRequest) (*ListAPIKeysResponse, error)
DeleteAPIKey(context.Context, *DeleteAPIKeyRequest) (*DeleteAPIKeyResponse, error)
// contains filtered or unexported methods
}
UsersServiceServer is the server API for UsersService service. All implementations must embed UnimplementedUsersServiceServer for forward compatibility