asmv1alpha1connect

package
v1.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// AsmServiceCreateSessionProcedure is the fully-qualified name of the AsmService's CreateSession
	// RPC.
	AsmServiceCreateSessionProcedure = "/services.omnichannel.asm.v1alpha1.AsmService/CreateSession"
	// AsmServiceEndSessionProcedure is the fully-qualified name of the AsmService's EndSession RPC.
	AsmServiceEndSessionProcedure = "/services.omnichannel.asm.v1alpha1.AsmService/EndSession"
	// AsmServiceGetCurrentSessionProcedure is the fully-qualified name of the AsmService's
	// GetCurrentSession RPC.
	AsmServiceGetCurrentSessionProcedure = "/services.omnichannel.asm.v1alpha1.AsmService/GetCurrentSession"
	// AsmServiceEnableVoiceProcedure is the fully-qualified name of the AsmService's EnableVoice RPC.
	AsmServiceEnableVoiceProcedure = "/services.omnichannel.asm.v1alpha1.AsmService/EnableVoice"
	// AsmServiceDisableVoiceProcedure is the fully-qualified name of the AsmService's DisableVoice RPC.
	AsmServiceDisableVoiceProcedure = "/services.omnichannel.asm.v1alpha1.AsmService/DisableVoice"
	// AsmServiceListAsmUserDetailsProcedure is the fully-qualified name of the AsmService's
	// ListAsmUserDetails RPC.
	AsmServiceListAsmUserDetailsProcedure = "/services.omnichannel.asm.v1alpha1.AsmService/ListAsmUserDetails"
	// AsmServicePushEventsProcedure is the fully-qualified name of the AsmService's PushEvents RPC.
	AsmServicePushEventsProcedure = "/services.omnichannel.asm.v1alpha1.AsmService/PushEvents"
)

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.

View Source
const (
	// AsmServiceName is the fully-qualified name of the AsmService service.
	AsmServiceName = "services.omnichannel.asm.v1alpha1.AsmService"
)

Variables

This section is empty.

Functions

func NewAsmServiceHandler

func NewAsmServiceHandler(svc AsmServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)

NewAsmServiceHandler 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 AsmServiceClient

type AsmServiceClient interface {
	// Creates an agent session and enables the voice channel
	CreateSession(context.Context, *connect_go.Request[v1alpha1.CreateSessionRequest]) (*connect_go.Response[v1alpha1.CreateSessionResponse], error)
	// Closes an asm session and all sub sessions
	EndSession(context.Context, *connect_go.Request[v1alpha1.EndSessionRequest]) (*connect_go.Response[v1alpha1.EndSessionResponse], error)
	// Gets an agent's current asm session
	GetCurrentSession(context.Context, *connect_go.Request[v1alpha1.GetCurrentSessionRequest]) (*connect_go.Response[v1alpha1.GetCurrentSessionResponse], error)
	// Updates the currently active subsession
	EnableVoice(context.Context, *connect_go.Request[v1alpha1.EnableVoiceRequest]) (*connect_go.Response[v1alpha1.EnableVoiceResponse], error)
	DisableVoice(context.Context, *connect_go.Request[v1alpha1.DisableVoiceRequest]) (*connect_go.Response[v1alpha1.DisableVoiceResponse], error)
	// List all Sessions for the given user. Contains statistical enrichments for each agent and their conversations.
	ListAsmUserDetails(context.Context, *connect_go.Request[v1alpha1.ListAsmUserDetailsRequest]) (*connect_go.Response[v1alpha1.ListAsmUserDetailsResponse], error)
	// puah events push a list of events
	PushEvents(context.Context, *connect_go.Request[v1alpha1.PushEventsRequest]) (*connect_go.Response[v1alpha1.PushEventResponse], error)
}

AsmServiceClient is a client for the services.omnichannel.asm.v1alpha1.AsmService service.

func NewAsmServiceClient

func NewAsmServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AsmServiceClient

NewAsmServiceClient constructs a client for the services.omnichannel.asm.v1alpha1.AsmService 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 AsmServiceHandler

type AsmServiceHandler interface {
	// Creates an agent session and enables the voice channel
	CreateSession(context.Context, *connect_go.Request[v1alpha1.CreateSessionRequest]) (*connect_go.Response[v1alpha1.CreateSessionResponse], error)
	// Closes an asm session and all sub sessions
	EndSession(context.Context, *connect_go.Request[v1alpha1.EndSessionRequest]) (*connect_go.Response[v1alpha1.EndSessionResponse], error)
	// Gets an agent's current asm session
	GetCurrentSession(context.Context, *connect_go.Request[v1alpha1.GetCurrentSessionRequest]) (*connect_go.Response[v1alpha1.GetCurrentSessionResponse], error)
	// Updates the currently active subsession
	EnableVoice(context.Context, *connect_go.Request[v1alpha1.EnableVoiceRequest]) (*connect_go.Response[v1alpha1.EnableVoiceResponse], error)
	DisableVoice(context.Context, *connect_go.Request[v1alpha1.DisableVoiceRequest]) (*connect_go.Response[v1alpha1.DisableVoiceResponse], error)
	// List all Sessions for the given user. Contains statistical enrichments for each agent and their conversations.
	ListAsmUserDetails(context.Context, *connect_go.Request[v1alpha1.ListAsmUserDetailsRequest]) (*connect_go.Response[v1alpha1.ListAsmUserDetailsResponse], error)
	// puah events push a list of events
	PushEvents(context.Context, *connect_go.Request[v1alpha1.PushEventsRequest]) (*connect_go.Response[v1alpha1.PushEventResponse], error)
}

AsmServiceHandler is an implementation of the services.omnichannel.asm.v1alpha1.AsmService service.

type UnimplementedAsmServiceHandler

type UnimplementedAsmServiceHandler struct{}

UnimplementedAsmServiceHandler returns CodeUnimplemented from all methods.

Jump to

Keyboard shortcuts

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