Documentation ¶
Index ¶
- Constants
- func NewChatsAPIHandler(svc ChatsAPIHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewMessagesAPIHandler(svc MessagesAPIHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewStreamServiceHandler(svc StreamServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)
- func NewUsersAPIHandler(svc UsersAPIHandler, opts ...connect.HandlerOption) (string, http.Handler)
- type ChatsAPIClient
- type ChatsAPIHandler
- type MessagesAPIClient
- type MessagesAPIHandler
- type StreamServiceClient
- type StreamServiceHandler
- type UnimplementedChatsAPIHandler
- func (UnimplementedChatsAPIHandler) ChangeDepartment(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) ChangeGateway(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) ChangeStatus(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) Create(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) Delete(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) Get(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) GetBotState(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) List(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Chats], error)
- func (UnimplementedChatsAPIHandler) MergeChats(context.Context, *connect.Request[cc.Merge]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) SetBotState(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- func (UnimplementedChatsAPIHandler) SyncChats(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Empty], error)
- func (UnimplementedChatsAPIHandler) Update(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error)
- type UnimplementedMessagesAPIHandler
- func (UnimplementedMessagesAPIHandler) Delete(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error)
- func (UnimplementedMessagesAPIHandler) Get(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Messages], error)
- func (UnimplementedMessagesAPIHandler) Send(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error)
- func (UnimplementedMessagesAPIHandler) Update(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error)
- type UnimplementedStreamServiceHandler
- type UnimplementedUsersAPIHandler
- func (UnimplementedUsersAPIHandler) FetchDefaults(context.Context, *connect.Request[cc.FetchDefaultsRequest]) (*connect.Response[cc.Defaults], error)
- func (UnimplementedUsersAPIHandler) GetConfig(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Defaults], error)
- func (UnimplementedUsersAPIHandler) GetMembers(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Users], error)
- func (UnimplementedUsersAPIHandler) Me(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.User], error)
- func (UnimplementedUsersAPIHandler) Resolve(context.Context, *connect.Request[cc.Users]) (*connect.Response[cc.Users], error)
- func (UnimplementedUsersAPIHandler) SetConfig(context.Context, *connect.Request[cc.Defaults]) (*connect.Response[cc.Defaults], error)
- type UsersAPIClient
- type UsersAPIHandler
Constants ¶
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" )
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 ¶
type ChatsAPIClient interface { Create(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) Update(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) Get(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) List(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Chats], error) Delete(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) SetBotState(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) GetBotState(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) ChangeDepartment(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) ChangeGateway(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) ChangeStatus(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) MergeChats(context.Context, *connect.Request[cc.Merge]) (*connect.Response[cc.Chat], error) SyncChats(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Empty], error) }
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 ChatsAPIHandler ¶
type ChatsAPIHandler interface { Create(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) Update(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) Get(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) List(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Chats], error) Delete(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) SetBotState(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) GetBotState(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) ChangeDepartment(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) ChangeGateway(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) ChangeStatus(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Chat], error) MergeChats(context.Context, *connect.Request[cc.Merge]) (*connect.Response[cc.Chat], error) SyncChats(context.Context, *connect.Request[cc.Empty]) (*connect.Response[cc.Empty], error) }
ChatsAPIHandler is an implementation of the cc.ChatsAPI service.
type MessagesAPIClient ¶
type MessagesAPIClient interface { Get(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Messages], error) Send(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error) Update(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error) Delete(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error) }
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 ¶
type MessagesAPIHandler interface { Get(context.Context, *connect.Request[cc.Chat]) (*connect.Response[cc.Messages], error) Send(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error) Update(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error) Delete(context.Context, *connect.Request[cc.Message]) (*connect.Response[cc.Message], error) }
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) GetBotState ¶
func (UnimplementedChatsAPIHandler) MergeChats ¶
func (UnimplementedChatsAPIHandler) SetBotState ¶
type UnimplementedMessagesAPIHandler ¶
type UnimplementedMessagesAPIHandler struct{}
UnimplementedMessagesAPIHandler returns CodeUnimplemented from all methods.
type UnimplementedStreamServiceHandler ¶
type UnimplementedStreamServiceHandler struct{}
UnimplementedStreamServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedStreamServiceHandler) Stream ¶
func (UnimplementedStreamServiceHandler) Stream(context.Context, *connect.Request[cc.StreamRequest], *connect.ServerStream[cc.Event]) error
type UnimplementedUsersAPIHandler ¶
type UnimplementedUsersAPIHandler struct{}
UnimplementedUsersAPIHandler returns CodeUnimplemented from all methods.
func (UnimplementedUsersAPIHandler) FetchDefaults ¶
func (UnimplementedUsersAPIHandler) GetMembers ¶
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.