ccconnect

package
v0.0.0-...-e9ae6a4 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ChatsAPIName is the fully-qualified name of the ChatsAPI service.
	ChatsAPIName = "cc.ChatsAPI"
	// MessagesAPIName is the fully-qualified name of the MessagesAPI service.
	MessagesAPIName = "cc.MessagesAPI"
	// UsersAPIName is the fully-qualified name of the UsersAPI service.
	UsersAPIName = "cc.UsersAPI"
	// StreamServiceName is the fully-qualified name of the StreamService service.
	StreamServiceName = "cc.StreamService"
)
View Source
const (
	// ChatsAPICreateProcedure is the fully-qualified name of the ChatsAPI's Create RPC.
	ChatsAPICreateProcedure = "/cc.ChatsAPI/Create"
	// ChatsAPIUpdateProcedure is the fully-qualified name of the ChatsAPI's Update RPC.
	ChatsAPIUpdateProcedure = "/cc.ChatsAPI/Update"
	// ChatsAPIGetProcedure is the fully-qualified name of the ChatsAPI's Get RPC.
	ChatsAPIGetProcedure = "/cc.ChatsAPI/Get"
	// ChatsAPIListProcedure is the fully-qualified name of the ChatsAPI's List RPC.
	ChatsAPIListProcedure = "/cc.ChatsAPI/List"
	// ChatsAPIDeleteProcedure is the fully-qualified name of the ChatsAPI's Delete RPC.
	ChatsAPIDeleteProcedure = "/cc.ChatsAPI/Delete"
	// ChatsAPISetBotStateProcedure is the fully-qualified name of the ChatsAPI's SetBotState RPC.
	ChatsAPISetBotStateProcedure = "/cc.ChatsAPI/SetBotState"
	// ChatsAPIGetBotStateProcedure is the fully-qualified name of the ChatsAPI's GetBotState RPC.
	ChatsAPIGetBotStateProcedure = "/cc.ChatsAPI/GetBotState"
	// ChatsAPIChangeDepartmentProcedure is the fully-qualified name of the ChatsAPI's ChangeDepartment
	// RPC.
	ChatsAPIChangeDepartmentProcedure = "/cc.ChatsAPI/ChangeDepartment"
	// ChatsAPIChangeGatewayProcedure is the fully-qualified name of the ChatsAPI's ChangeGateway RPC.
	ChatsAPIChangeGatewayProcedure = "/cc.ChatsAPI/ChangeGateway"
	// ChatsAPIChangeStatusProcedure is the fully-qualified name of the ChatsAPI's ChangeStatus RPC.
	ChatsAPIChangeStatusProcedure = "/cc.ChatsAPI/ChangeStatus"
	// ChatsAPIMergeChatsProcedure is the fully-qualified name of the ChatsAPI's MergeChats RPC.
	ChatsAPIMergeChatsProcedure = "/cc.ChatsAPI/MergeChats"
	// ChatsAPISyncChatsProcedure is the fully-qualified name of the ChatsAPI's SyncChats RPC.
	ChatsAPISyncChatsProcedure = "/cc.ChatsAPI/SyncChats"
	// MessagesAPIGetProcedure is the fully-qualified name of the MessagesAPI's Get RPC.
	MessagesAPIGetProcedure = "/cc.MessagesAPI/Get"
	// MessagesAPISendProcedure is the fully-qualified name of the MessagesAPI's Send RPC.
	MessagesAPISendProcedure = "/cc.MessagesAPI/Send"
	// MessagesAPIUpdateProcedure is the fully-qualified name of the MessagesAPI's Update RPC.
	MessagesAPIUpdateProcedure = "/cc.MessagesAPI/Update"
	// MessagesAPIDeleteProcedure is the fully-qualified name of the MessagesAPI's Delete RPC.
	MessagesAPIDeleteProcedure = "/cc.MessagesAPI/Delete"
	// UsersAPIMeProcedure is the fully-qualified name of the UsersAPI's Me RPC.
	UsersAPIMeProcedure = "/cc.UsersAPI/Me"
	// UsersAPIFetchDefaultsProcedure is the fully-qualified name of the UsersAPI's FetchDefaults RPC.
	UsersAPIFetchDefaultsProcedure = "/cc.UsersAPI/FetchDefaults"
	// UsersAPIGetConfigProcedure is the fully-qualified name of the UsersAPI's GetConfig RPC.
	UsersAPIGetConfigProcedure = "/cc.UsersAPI/GetConfig"
	// UsersAPISetConfigProcedure is the fully-qualified name of the UsersAPI's SetConfig RPC.
	UsersAPISetConfigProcedure = "/cc.UsersAPI/SetConfig"
	// UsersAPIResolveProcedure is the fully-qualified name of the UsersAPI's Resolve RPC.
	UsersAPIResolveProcedure = "/cc.UsersAPI/Resolve"
	// UsersAPIGetMembersProcedure is the fully-qualified name of the UsersAPI's GetMembers RPC.
	UsersAPIGetMembersProcedure = "/cc.UsersAPI/GetMembers"
	// StreamServiceStreamProcedure is the fully-qualified name of the StreamService's Stream RPC.
	StreamServiceStreamProcedure = "/cc.StreamService/Stream"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

Variables

This section is empty.

Functions

func NewChatsAPIHandler

func NewChatsAPIHandler(svc ChatsAPIHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewChatsAPIHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewMessagesAPIHandler

func NewMessagesAPIHandler(svc MessagesAPIHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewMessagesAPIHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewStreamServiceHandler

func NewStreamServiceHandler(svc StreamServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewStreamServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

func NewUsersAPIHandler

func NewUsersAPIHandler(svc UsersAPIHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewUsersAPIHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type ChatsAPIClient

ChatsAPIClient is a client for the cc.ChatsAPI service.

func NewChatsAPIClient

func NewChatsAPIClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ChatsAPIClient

NewChatsAPIClient constructs a client for the cc.ChatsAPI service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type MessagesAPIClient

MessagesAPIClient is a client for the cc.MessagesAPI service.

func NewMessagesAPIClient

func NewMessagesAPIClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MessagesAPIClient

NewMessagesAPIClient constructs a client for the cc.MessagesAPI service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type MessagesAPIHandler

MessagesAPIHandler is an implementation of the cc.MessagesAPI service.

type StreamServiceClient

type StreamServiceClient interface {
	Stream(context.Context, *connect.Request[cc.StreamRequest]) (*connect.ServerStreamForClient[cc.Event], error)
}

StreamServiceClient is a client for the cc.StreamService service.

func NewStreamServiceClient

func NewStreamServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) StreamServiceClient

NewStreamServiceClient constructs a client for the cc.StreamService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type StreamServiceHandler

type StreamServiceHandler interface {
	Stream(context.Context, *connect.Request[cc.StreamRequest], *connect.ServerStream[cc.Event]) error
}

StreamServiceHandler is an implementation of the cc.StreamService service.

type UnimplementedChatsAPIHandler

type UnimplementedChatsAPIHandler struct{}

UnimplementedChatsAPIHandler returns CodeUnimplemented from all methods.

func (UnimplementedChatsAPIHandler) ChangeDepartment

func (UnimplementedChatsAPIHandler) ChangeGateway

func (UnimplementedChatsAPIHandler) ChangeStatus

func (UnimplementedChatsAPIHandler) Create

func (UnimplementedChatsAPIHandler) Delete

func (UnimplementedChatsAPIHandler) Get

func (UnimplementedChatsAPIHandler) GetBotState

func (UnimplementedChatsAPIHandler) List

func (UnimplementedChatsAPIHandler) MergeChats

func (UnimplementedChatsAPIHandler) SetBotState

func (UnimplementedChatsAPIHandler) SyncChats

func (UnimplementedChatsAPIHandler) Update

type UnimplementedMessagesAPIHandler

type UnimplementedMessagesAPIHandler struct{}

UnimplementedMessagesAPIHandler returns CodeUnimplemented from all methods.

func (UnimplementedMessagesAPIHandler) Delete

func (UnimplementedMessagesAPIHandler) Get

func (UnimplementedMessagesAPIHandler) Send

func (UnimplementedMessagesAPIHandler) Update

type UnimplementedStreamServiceHandler

type UnimplementedStreamServiceHandler struct{}

UnimplementedStreamServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedStreamServiceHandler) Stream

type UnimplementedUsersAPIHandler

type UnimplementedUsersAPIHandler struct{}

UnimplementedUsersAPIHandler returns CodeUnimplemented from all methods.

func (UnimplementedUsersAPIHandler) GetConfig

func (UnimplementedUsersAPIHandler) GetMembers

func (UnimplementedUsersAPIHandler) Me

func (UnimplementedUsersAPIHandler) Resolve

func (UnimplementedUsersAPIHandler) SetConfig

type UsersAPIClient

type UsersAPIClient interface {
	Me(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.User], error)
	FetchDefaults(context.Context, *connect.Request[cc.FetchDefaultsRequest]) (*connect.Response[cc.Defaults], error)
	GetConfig(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Defaults], error)
	SetConfig(context.Context, *connect.Request[cc.Defaults]) (*connect.Response[cc.Defaults], error)
	// Resolves given Users data by their UUIDs
	// And returns all accessible Users for Requestor
	Resolve(context.Context, *connect.Request[cc.Users]) (*connect.Response[cc.Users], error)
	GetMembers(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Users], error)
}

UsersAPIClient is a client for the cc.UsersAPI service.

func NewUsersAPIClient

func NewUsersAPIClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UsersAPIClient

NewUsersAPIClient constructs a client for the cc.UsersAPI service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type UsersAPIHandler

type UsersAPIHandler interface {
	Me(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.User], error)
	FetchDefaults(context.Context, *connect.Request[cc.FetchDefaultsRequest]) (*connect.Response[cc.Defaults], error)
	GetConfig(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Defaults], error)
	SetConfig(context.Context, *connect.Request[cc.Defaults]) (*connect.Response[cc.Defaults], error)
	// Resolves given Users data by their UUIDs
	// And returns all accessible Users for Requestor
	Resolve(context.Context, *connect.Request[cc.Users]) (*connect.Response[cc.Users], error)
	GetMembers(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Users], error)
}

UsersAPIHandler is an implementation of the cc.UsersAPI service.

Jump to

Keyboard shortcuts

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