v1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 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_user_manager_service_proto protoreflect.FileDescriptor
View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use APIKey.ProtoReflect.Descriptor instead.

func (*APIKey) GetCreatedAt

func (x *APIKey) GetCreatedAt() int64

func (*APIKey) GetId

func (x *APIKey) GetId() string

func (*APIKey) GetName

func (x *APIKey) GetName() string

func (*APIKey) GetObject

func (x *APIKey) GetObject() string

func (*APIKey) GetSecret

func (x *APIKey) GetSecret() string

func (*APIKey) ProtoMessage

func (*APIKey) ProtoMessage()

func (*APIKey) ProtoReflect

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

func (*APIKey) Reset

func (x *APIKey) Reset()

func (*APIKey) String

func (x *APIKey) String() string

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

type UnimplementedUsersServiceServer

type UnimplementedUsersServiceServer struct {
}

UnimplementedUsersServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUsersServiceServer) CreateAPIKey

func (UnimplementedUsersServiceServer) DeleteAPIKey

func (UnimplementedUsersServiceServer) ListAPIKeys

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.

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.

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

Jump to

Keyboard shortcuts

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