Documentation ¶
Index ¶
- Constants
- func NewTrustsServiceHandler(svc TrustsServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
- type TrustsServiceClient
- type TrustsServiceHandler
- type UnimplementedTrustsServiceHandler
- func (UnimplementedTrustsServiceHandler) AcceptTrust(context.Context, *connect_go.Request[org.AcceptTrustRequest]) (*connect_go.Response[org.AcceptTrustResponse], error)
- func (UnimplementedTrustsServiceHandler) AssignTrust(context.Context, *connect_go.Request[org.AssignTrustRequest]) (*connect_go.Response[org.AssignTrustResponse], error)
- func (UnimplementedTrustsServiceHandler) CreateTrust(context.Context, *connect_go.Request[org.CreateTrustRequest]) (*connect_go.Response[org.CreateTrustResponse], error)
- func (UnimplementedTrustsServiceHandler) DeleteTrust(context.Context, *connect_go.Request[org.DeleteTrustRequest]) (*connect_go.Response[org.DeleteTrustResponse], error)
- func (UnimplementedTrustsServiceHandler) GetTrust(context.Context, *connect_go.Request[org.GetTrustRequest]) (*connect_go.Response[org.GetTrustResponse], error)
- func (UnimplementedTrustsServiceHandler) ListAssignableTrusts(context.Context, *connect_go.Request[org.ListAssignableTrustsRequest]) (*connect_go.Response[org.ListAssignableTrustsResponse], error)
- func (UnimplementedTrustsServiceHandler) ListGivenTrusts(context.Context, *connect_go.Request[org.ListGivenTrustsRequest]) (*connect_go.Response[org.ListGivenTrustsResponse], error)
- func (UnimplementedTrustsServiceHandler) ListIncomingTrusts(context.Context, *connect_go.Request[org.ListIncomingTrustsRequest]) (*connect_go.Response[org.ListIncomingTrustsResponse], error)
- func (UnimplementedTrustsServiceHandler) RejectTrust(context.Context, *connect_go.Request[org.RejectTrustRequest]) (*connect_go.Response[org.RejectTrustResponse], error)
- func (UnimplementedTrustsServiceHandler) UnassignTrust(context.Context, *connect_go.Request[org.UnassignTrustRequest]) (*connect_go.Response[org.UnassignTrustResponse], error)
Constants ¶
const ( // TrustsServiceCreateTrustProcedure is the fully-qualified name of the TrustsService's CreateTrust // RPC. TrustsServiceCreateTrustProcedure = "/api.v1alpha1.org.trusts.TrustsService/CreateTrust" // TrustsServiceAcceptTrustProcedure is the fully-qualified name of the TrustsService's AcceptTrust // RPC. TrustsServiceAcceptTrustProcedure = "/api.v1alpha1.org.trusts.TrustsService/AcceptTrust" // TrustsServiceRejectTrustProcedure is the fully-qualified name of the TrustsService's RejectTrust // RPC. TrustsServiceRejectTrustProcedure = "/api.v1alpha1.org.trusts.TrustsService/RejectTrust" // TrustsServiceGetTrustProcedure is the fully-qualified name of the TrustsService's GetTrust RPC. TrustsServiceGetTrustProcedure = "/api.v1alpha1.org.trusts.TrustsService/GetTrust" // TrustsServiceListIncomingTrustsProcedure is the fully-qualified name of the TrustsService's // ListIncomingTrusts RPC. TrustsServiceListIncomingTrustsProcedure = "/api.v1alpha1.org.trusts.TrustsService/ListIncomingTrusts" // TrustsServiceListGivenTrustsProcedure is the fully-qualified name of the TrustsService's // ListGivenTrusts RPC. TrustsServiceListGivenTrustsProcedure = "/api.v1alpha1.org.trusts.TrustsService/ListGivenTrusts" // TrustsServiceListAssignableTrustsProcedure is the fully-qualified name of the TrustsService's // ListAssignableTrusts RPC. TrustsServiceListAssignableTrustsProcedure = "/api.v1alpha1.org.trusts.TrustsService/ListAssignableTrusts" // TrustsServiceDeleteTrustProcedure is the fully-qualified name of the TrustsService's DeleteTrust // RPC. TrustsServiceDeleteTrustProcedure = "/api.v1alpha1.org.trusts.TrustsService/DeleteTrust" // TrustsServiceAssignTrustProcedure is the fully-qualified name of the TrustsService's AssignTrust // RPC. TrustsServiceAssignTrustProcedure = "/api.v1alpha1.org.trusts.TrustsService/AssignTrust" // TrustsServiceUnassignTrustProcedure is the fully-qualified name of the TrustsService's // UnassignTrust RPC. TrustsServiceUnassignTrustProcedure = "/api.v1alpha1.org.trusts.TrustsService/UnassignTrust" )
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 (
// TrustsServiceName is the fully-qualified name of the TrustsService service.
TrustsServiceName = "api.v1alpha1.org.trusts.TrustsService"
)
Variables ¶
This section is empty.
Functions ¶
func NewTrustsServiceHandler ¶
func NewTrustsServiceHandler(svc TrustsServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler)
NewTrustsServiceHandler 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 TrustsServiceClient ¶
type TrustsServiceClient interface { // CreateTrust creates a new trust. CreateTrust(context.Context, *connect_go.Request[org.CreateTrustRequest]) (*connect_go.Response[org.CreateTrustResponse], error) // AcceptTrust accepts an incoming trust. AcceptTrust(context.Context, *connect_go.Request[org.AcceptTrustRequest]) (*connect_go.Response[org.AcceptTrustResponse], error) // RejectTrust rejects an incoming trust. RejectTrust(context.Context, *connect_go.Request[org.RejectTrustRequest]) (*connect_go.Response[org.RejectTrustResponse], error) // GetTrust returns a single trust by trust id. GetTrust(context.Context, *connect_go.Request[org.GetTrustRequest]) (*connect_go.Response[org.GetTrustResponse], error) // ListIncomingTrusts returns all pending trusts that are being granted // to the org of the currently logged in user. ListIncomingTrusts(context.Context, *connect_go.Request[org.ListIncomingTrustsRequest]) (*connect_go.Response[org.ListIncomingTrustsResponse], error) // ListGivenTrusts returns all trusts that have been given out for // the currently logged in user's org. The returned list will contain // accepted, pending, and rejected trusts. ListGivenTrusts(context.Context, *connect_go.Request[org.ListGivenTrustsRequest]) (*connect_go.Response[org.ListGivenTrustsResponse], error) // ListAssignableTrusts returns all accepted trusts that are being granted // to the org of the currently logged in user. ListAssignableTrusts(context.Context, *connect_go.Request[org.ListAssignableTrustsRequest]) (*connect_go.Response[org.ListAssignableTrustsResponse], error) // DeleteTrust deletes a trust by trust id. Only trusts where the current // org is the grantor can be deleted by this endpoint. DeleteTrust(context.Context, *connect_go.Request[org.DeleteTrustRequest]) (*connect_go.Response[org.DeleteTrustResponse], error) // AssignTrust assigns a trust to the given user ids. AssignTrust(context.Context, *connect_go.Request[org.AssignTrustRequest]) (*connect_go.Response[org.AssignTrustResponse], error) // UnassignTrust unassigns a trust from the given user id. UnassignTrust(context.Context, *connect_go.Request[org.UnassignTrustRequest]) (*connect_go.Response[org.UnassignTrustResponse], error) }
TrustsServiceClient is a client for the api.v1alpha1.org.trusts.TrustsService service.
func NewTrustsServiceClient ¶
func NewTrustsServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) TrustsServiceClient
NewTrustsServiceClient constructs a client for the api.v1alpha1.org.trusts.TrustsService 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 TrustsServiceHandler ¶
type TrustsServiceHandler interface { // CreateTrust creates a new trust. CreateTrust(context.Context, *connect_go.Request[org.CreateTrustRequest]) (*connect_go.Response[org.CreateTrustResponse], error) // AcceptTrust accepts an incoming trust. AcceptTrust(context.Context, *connect_go.Request[org.AcceptTrustRequest]) (*connect_go.Response[org.AcceptTrustResponse], error) // RejectTrust rejects an incoming trust. RejectTrust(context.Context, *connect_go.Request[org.RejectTrustRequest]) (*connect_go.Response[org.RejectTrustResponse], error) // GetTrust returns a single trust by trust id. GetTrust(context.Context, *connect_go.Request[org.GetTrustRequest]) (*connect_go.Response[org.GetTrustResponse], error) // ListIncomingTrusts returns all pending trusts that are being granted // to the org of the currently logged in user. ListIncomingTrusts(context.Context, *connect_go.Request[org.ListIncomingTrustsRequest]) (*connect_go.Response[org.ListIncomingTrustsResponse], error) // ListGivenTrusts returns all trusts that have been given out for // the currently logged in user's org. The returned list will contain // accepted, pending, and rejected trusts. ListGivenTrusts(context.Context, *connect_go.Request[org.ListGivenTrustsRequest]) (*connect_go.Response[org.ListGivenTrustsResponse], error) // ListAssignableTrusts returns all accepted trusts that are being granted // to the org of the currently logged in user. ListAssignableTrusts(context.Context, *connect_go.Request[org.ListAssignableTrustsRequest]) (*connect_go.Response[org.ListAssignableTrustsResponse], error) // DeleteTrust deletes a trust by trust id. Only trusts where the current // org is the grantor can be deleted by this endpoint. DeleteTrust(context.Context, *connect_go.Request[org.DeleteTrustRequest]) (*connect_go.Response[org.DeleteTrustResponse], error) // AssignTrust assigns a trust to the given user ids. AssignTrust(context.Context, *connect_go.Request[org.AssignTrustRequest]) (*connect_go.Response[org.AssignTrustResponse], error) // UnassignTrust unassigns a trust from the given user id. UnassignTrust(context.Context, *connect_go.Request[org.UnassignTrustRequest]) (*connect_go.Response[org.UnassignTrustResponse], error) }
TrustsServiceHandler is an implementation of the api.v1alpha1.org.trusts.TrustsService service.
type UnimplementedTrustsServiceHandler ¶
type UnimplementedTrustsServiceHandler struct{}
UnimplementedTrustsServiceHandler returns CodeUnimplemented from all methods.
func (UnimplementedTrustsServiceHandler) AcceptTrust ¶
func (UnimplementedTrustsServiceHandler) AcceptTrust(context.Context, *connect_go.Request[org.AcceptTrustRequest]) (*connect_go.Response[org.AcceptTrustResponse], error)
func (UnimplementedTrustsServiceHandler) AssignTrust ¶
func (UnimplementedTrustsServiceHandler) AssignTrust(context.Context, *connect_go.Request[org.AssignTrustRequest]) (*connect_go.Response[org.AssignTrustResponse], error)
func (UnimplementedTrustsServiceHandler) CreateTrust ¶
func (UnimplementedTrustsServiceHandler) CreateTrust(context.Context, *connect_go.Request[org.CreateTrustRequest]) (*connect_go.Response[org.CreateTrustResponse], error)
func (UnimplementedTrustsServiceHandler) DeleteTrust ¶
func (UnimplementedTrustsServiceHandler) DeleteTrust(context.Context, *connect_go.Request[org.DeleteTrustRequest]) (*connect_go.Response[org.DeleteTrustResponse], error)
func (UnimplementedTrustsServiceHandler) GetTrust ¶
func (UnimplementedTrustsServiceHandler) GetTrust(context.Context, *connect_go.Request[org.GetTrustRequest]) (*connect_go.Response[org.GetTrustResponse], error)
func (UnimplementedTrustsServiceHandler) ListAssignableTrusts ¶
func (UnimplementedTrustsServiceHandler) ListAssignableTrusts(context.Context, *connect_go.Request[org.ListAssignableTrustsRequest]) (*connect_go.Response[org.ListAssignableTrustsResponse], error)
func (UnimplementedTrustsServiceHandler) ListGivenTrusts ¶
func (UnimplementedTrustsServiceHandler) ListGivenTrusts(context.Context, *connect_go.Request[org.ListGivenTrustsRequest]) (*connect_go.Response[org.ListGivenTrustsResponse], error)
func (UnimplementedTrustsServiceHandler) ListIncomingTrusts ¶
func (UnimplementedTrustsServiceHandler) ListIncomingTrusts(context.Context, *connect_go.Request[org.ListIncomingTrustsRequest]) (*connect_go.Response[org.ListIncomingTrustsResponse], error)
func (UnimplementedTrustsServiceHandler) RejectTrust ¶
func (UnimplementedTrustsServiceHandler) RejectTrust(context.Context, *connect_go.Request[org.RejectTrustRequest]) (*connect_go.Response[org.RejectTrustResponse], error)
func (UnimplementedTrustsServiceHandler) UnassignTrust ¶
func (UnimplementedTrustsServiceHandler) UnassignTrust(context.Context, *connect_go.Request[org.UnassignTrustRequest]) (*connect_go.Response[org.UnassignTrustResponse], error)