Documentation ¶
Index ¶
- Constants
- func NewPBXServiceHandler(svc PBXServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
- type PBXServiceClient
- type PBXServiceHandler
- type UnimplementedPBXServiceHandler
- func (UnimplementedPBXServiceHandler) AssignRandomExtension(context.Context, *connect_go.Request[v1.AssignRandomExtensionRequest]) (*connect_go.Response[v1.AssignRandomExtensionResponse], error)
- func (UnimplementedPBXServiceHandler) CreateRingGroup(context.Context, *connect_go.Request[v1.CreateRingGroupRequest]) (*connect_go.Response[v1.CreateRingGroupResponse], error)
- func (UnimplementedPBXServiceHandler) DeleteRingGroup(context.Context, *connect_go.Request[v1.DeleteRingGroupRequest]) (*connect_go.Response[v1.DeleteRingGroupResponse], error)
- func (UnimplementedPBXServiceHandler) QueryPbxUsers(context.Context, *connect_go.Request[v1.QueryPbxUsersRequest]) (*connect_go.Response[v1.QueryPbxUsersResponse], error)
- func (UnimplementedPBXServiceHandler) QueryRingGroups(context.Context, *connect_go.Request[v1.QueryRingGroupsRequest]) (*connect_go.Response[v1.QueryRingGroupsResponse], error)
- func (UnimplementedPBXServiceHandler) UpdatePbxUser(context.Context, *connect_go.Request[v1.UpdatePbxUserRequest]) (*connect_go.Response[v1.UpdatePbxUserResponse], error)
- func (UnimplementedPBXServiceHandler) UpdateRingGroup(context.Context, *connect_go.Request[v1.UpdateRingGroupRequest]) (*connect_go.Response[v1.UpdateRingGroupResponse], error)
Constants ¶
const ( // PBXServiceQueryPbxUsersProcedure is the fully-qualified name of the PBXService's QueryPbxUsers // RPC. PBXServiceQueryPbxUsersProcedure = "/services.pbx.v1.PBXService/QueryPbxUsers" // PBXServiceQueryRingGroupsProcedure is the fully-qualified name of the PBXService's // QueryRingGroups RPC. PBXServiceQueryRingGroupsProcedure = "/services.pbx.v1.PBXService/QueryRingGroups" // PBXServiceUpdatePbxUserProcedure is the fully-qualified name of the PBXService's UpdatePbxUser // RPC. PBXServiceUpdatePbxUserProcedure = "/services.pbx.v1.PBXService/UpdatePbxUser" // PBXServiceUpdateRingGroupProcedure is the fully-qualified name of the PBXService's // UpdateRingGroup RPC. PBXServiceUpdateRingGroupProcedure = "/services.pbx.v1.PBXService/UpdateRingGroup" // PBXServiceCreateRingGroupProcedure is the fully-qualified name of the PBXService's // CreateRingGroup RPC. PBXServiceCreateRingGroupProcedure = "/services.pbx.v1.PBXService/CreateRingGroup" // PBXServiceDeleteRingGroupProcedure is the fully-qualified name of the PBXService's // DeleteRingGroup RPC. PBXServiceDeleteRingGroupProcedure = "/services.pbx.v1.PBXService/DeleteRingGroup" // PBXServiceAssignRandomExtensionProcedure is the fully-qualified name of the PBXService's // AssignRandomExtension RPC. PBXServiceAssignRandomExtensionProcedure = "/services.pbx.v1.PBXService/AssignRandomExtension" )
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.
const (
// PBXServiceName is the fully-qualified name of the PBXService service.
PBXServiceName = "services.pbx.v1.PBXService"
)
Variables ¶
This section is empty.
Functions ¶
func NewPBXServiceHandler ¶
func NewPBXServiceHandler(svc PBXServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
NewPBXServiceHandler 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 PBXServiceClient ¶
type PBXServiceClient interface { // Queries details of PBX Users based on specified criteria for the authenticated callers ORG // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. QueryPbxUsers(context.Context, *connect_go.Request[v1.QueryPbxUsersRequest]) (*connect_go.Response[v1.QueryPbxUsersResponse], error) // Queries details of Ring Groups based on specified criteria for the authenticated callers ORG // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. QueryRingGroups(context.Context, *connect_go.Request[v1.QueryRingGroupsRequest]) (*connect_go.Response[v1.QueryRingGroupsResponse], error) // Updates details of a PBX User for the authenticated callers ORG. // Allows for updating, activating, and deactivating a user. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. UpdatePbxUser(context.Context, *connect_go.Request[v1.UpdatePbxUserRequest]) (*connect_go.Response[v1.UpdatePbxUserResponse], error) // Updates details of a Ring Group for the authenticated callers ORG. This operation acts as an "upsert". // - If the groupID is in the update mask and the group exists, the group will be updated. // - If the groupID is not in the update mask a group will be created. // // Allows for creating and updating a ring group. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.InvalidArgument: The request is invalid. // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. UpdateRingGroup(context.Context, *connect_go.Request[v1.UpdateRingGroupRequest]) (*connect_go.Response[v1.UpdateRingGroupResponse], error) // Creates a ring group for the authenticated caller's ORG. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.InvalidArgument: The request is invalid. // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. CreateRingGroup(context.Context, *connect_go.Request[v1.CreateRingGroupRequest]) (*connect_go.Response[v1.CreateRingGroupResponse], error) // Deletes a specific Ring Group for the authenticated caller's ORG. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.InvalidArgument: The groupID is an invalid format. // - grpc.NotFound: The group does not exist or is not in the caller's ORG. // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. DeleteRingGroup(context.Context, *connect_go.Request[v1.DeleteRingGroupRequest]) (*connect_go.Response[v1.DeleteRingGroupResponse], error) // Assigns a random extension either to a PBX user or a Ring Group // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. AssignRandomExtension(context.Context, *connect_go.Request[v1.AssignRandomExtensionRequest]) (*connect_go.Response[v1.AssignRandomExtensionResponse], error) }
PBXServiceClient is a client for the services.pbx.v1.PBXService service.
func NewPBXServiceClient ¶
func NewPBXServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) PBXServiceClient
NewPBXServiceClient constructs a client for the services.pbx.v1.PBXService 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 PBXServiceHandler ¶
type PBXServiceHandler interface { // Queries details of PBX Users based on specified criteria for the authenticated callers ORG // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. QueryPbxUsers(context.Context, *connect_go.Request[v1.QueryPbxUsersRequest]) (*connect_go.Response[v1.QueryPbxUsersResponse], error) // Queries details of Ring Groups based on specified criteria for the authenticated callers ORG // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. QueryRingGroups(context.Context, *connect_go.Request[v1.QueryRingGroupsRequest]) (*connect_go.Response[v1.QueryRingGroupsResponse], error) // Updates details of a PBX User for the authenticated callers ORG. // Allows for updating, activating, and deactivating a user. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. UpdatePbxUser(context.Context, *connect_go.Request[v1.UpdatePbxUserRequest]) (*connect_go.Response[v1.UpdatePbxUserResponse], error) // Updates details of a Ring Group for the authenticated callers ORG. This operation acts as an "upsert". // - If the groupID is in the update mask and the group exists, the group will be updated. // - If the groupID is not in the update mask a group will be created. // // Allows for creating and updating a ring group. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.InvalidArgument: The request is invalid. // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. UpdateRingGroup(context.Context, *connect_go.Request[v1.UpdateRingGroupRequest]) (*connect_go.Response[v1.UpdateRingGroupResponse], error) // Creates a ring group for the authenticated caller's ORG. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.InvalidArgument: The request is invalid. // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. CreateRingGroup(context.Context, *connect_go.Request[v1.CreateRingGroupRequest]) (*connect_go.Response[v1.CreateRingGroupResponse], error) // Deletes a specific Ring Group for the authenticated caller's ORG. // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.InvalidArgument: The groupID is an invalid format. // - grpc.NotFound: The group does not exist or is not in the caller's ORG. // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. DeleteRingGroup(context.Context, *connect_go.Request[v1.DeleteRingGroupRequest]) (*connect_go.Response[v1.DeleteRingGroupResponse], error) // Assigns a random extension either to a PBX user or a Ring Group // Required permissions: // // PBX-MANAGER // // Errors: // - grpc.PermissionDenied: Caller doesn't have the required permissions. // - grpc.Internal: An internal error occurred. // - grpc.Unavailable: The operation is currently unavailable. Likely a transient issue with a downstream service. AssignRandomExtension(context.Context, *connect_go.Request[v1.AssignRandomExtensionRequest]) (*connect_go.Response[v1.AssignRandomExtensionResponse], error) }
PBXServiceHandler is an implementation of the services.pbx.v1.PBXService service.
type UnimplementedPBXServiceHandler ¶
type UnimplementedPBXServiceHandler struct{}
UnimplementedPBXServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedPBXServiceHandler) AssignRandomExtension ¶
func (UnimplementedPBXServiceHandler) AssignRandomExtension(context.Context, *connect_go.Request[v1.AssignRandomExtensionRequest]) (*connect_go.Response[v1.AssignRandomExtensionResponse], error)
func (UnimplementedPBXServiceHandler) CreateRingGroup ¶
func (UnimplementedPBXServiceHandler) CreateRingGroup(context.Context, *connect_go.Request[v1.CreateRingGroupRequest]) (*connect_go.Response[v1.CreateRingGroupResponse], error)
func (UnimplementedPBXServiceHandler) DeleteRingGroup ¶
func (UnimplementedPBXServiceHandler) DeleteRingGroup(context.Context, *connect_go.Request[v1.DeleteRingGroupRequest]) (*connect_go.Response[v1.DeleteRingGroupResponse], error)
func (UnimplementedPBXServiceHandler) QueryPbxUsers ¶
func (UnimplementedPBXServiceHandler) QueryPbxUsers(context.Context, *connect_go.Request[v1.QueryPbxUsersRequest]) (*connect_go.Response[v1.QueryPbxUsersResponse], error)
func (UnimplementedPBXServiceHandler) QueryRingGroups ¶
func (UnimplementedPBXServiceHandler) QueryRingGroups(context.Context, *connect_go.Request[v1.QueryRingGroupsRequest]) (*connect_go.Response[v1.QueryRingGroupsResponse], error)
func (UnimplementedPBXServiceHandler) UpdatePbxUser ¶
func (UnimplementedPBXServiceHandler) UpdatePbxUser(context.Context, *connect_go.Request[v1.UpdatePbxUserRequest]) (*connect_go.Response[v1.UpdatePbxUserResponse], error)
func (UnimplementedPBXServiceHandler) UpdateRingGroup ¶
func (UnimplementedPBXServiceHandler) UpdateRingGroup(context.Context, *connect_go.Request[v1.UpdateRingGroupRequest]) (*connect_go.Response[v1.UpdateRingGroupResponse], error)