Documentation ¶
Overview ¶
packae tenant implements used tenant related types in the GraphQL transport layer
packae tenant implements used tenant related types in the GraphQL transport layer
packae tenant implements used tenant related types in the GraphQL transport layer
Index ¶
- type CreateTenantContract
- type CreateTenantInput
- type CreateTenantInputArgument
- type CreateTenantPayloadResolverContract
- type DeleteTenantContract
- type DeleteTenantInput
- type DeleteTenantInputArgument
- type DeleteTenantPayloadResolverContract
- type MutationResolverCreatorContract
- type QueryResolverCreatorContract
- type RootResolverContract
- type TenantClientContract
- type TenantClusterEdgeClusterInputArgument
- type TenantDetail
- type TenantEdgeClustersInputArgument
- type TenantResolverContract
- type TenantTypeConnectionResolverContract
- type TenantTypeEdgeResolverContract
- type UpdateTenantContract
- type UpdateTenantInput
- type UpdateTenantInputArgument
- type UpdateTenantPayloadResolverContract
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateTenantContract ¶
type CreateTenantContract interface { // MutateAndGetPayload creates a new tenant and returns the payload contains the result of creating a new tenant // ctx: Mandatory. Reference to the context // args: Mandatory. Reference to the input argument contains tenant information to create // Returns the new tenant payload or error if something goes wrong MutateAndGetPayload( ctx context.Context, args CreateTenantInputArgument) (CreateTenantPayloadResolverContract, error) }
CreateTenantContract declares the type to use when creating a new tenant
type CreateTenantInput ¶
type CreateTenantInputArgument ¶
type CreateTenantInputArgument struct {
Input CreateTenantInput
}
type CreateTenantPayloadResolverContract ¶
type CreateTenantPayloadResolverContract interface { // Tenant returns the new tenant inforamtion // ctx: Mandatory. Reference to the context // Returns the new tenant inforamtion Tenant(ctx context.Context) (TenantTypeEdgeResolverContract, error) // ClientMutationId returns the client mutation ID that was provided as part of the mutation request // ctx: Mandatory. Reference to the context // Returns the provided clientMutationId as part of mutation request ClientMutationId(ctx context.Context) *string }
CreateTenantPayloadResolverContract declares the resolver that can return the payload contains the result of creating a new tenant
type DeleteTenantContract ¶
type DeleteTenantContract interface { // MutateAndGetPayload update an existing tenant and returns the payload contains the result of deleting an existing tenant // ctx: Mandatory. Reference to the context // args: Mandatory. Reference to the input argument contains tenant information to update // Returns the deleted tenant payload or error if something goes wrong MutateAndGetPayload( ctx context.Context, args DeleteTenantInputArgument) (DeleteTenantPayloadResolverContract, error) }
DeleteTenantContract declares the type to use when updating an existing tenant
type DeleteTenantInput ¶
type DeleteTenantInputArgument ¶
type DeleteTenantInputArgument struct {
Input DeleteTenantInput
}
type DeleteTenantPayloadResolverContract ¶
type DeleteTenantPayloadResolverContract interface { // DeletedTenantID returns the unique identifier of the tenant that got deleted // ctx: Mandatory. Reference to the context // Returns the unique identifier of the the tenant that got deleted DeletedTenantID(ctx context.Context) graphql.ID // ClientMutationId returns the client mutation ID that was provided as part of the mutation request // ctx: Mandatory. Reference to the context // Returns the provided clientMutationId as part of mutation request ClientMutationId(ctx context.Context) *string }
DeleteTenantPayloadResolverContract declares the resolver that can return the payload contains the result of deleting an existing tenant
type MutationResolverCreatorContract ¶
type MutationResolverCreatorContract interface { // NewCreateTenant creates new instance of the CreateTenantContract, setting up all dependencies and returns the instance // ctx: Mandatory. Reference to the context // Returns the new instance or error if something goes wrong NewCreateTenant(ctx context.Context) (CreateTenantContract, error) // NewCreateTenantPayloadResolver creates new instance of the CreateTenantPayloadResolverContract, setting up all dependencies and returns the instance // ctx: Mandatory. Reference to the context // clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response // tenantID: Mandatory. The tenant unique identifier // tenantDetail: Mandatory. The tenant details // cursor: Mandatory. The edge cluster cursor // Returns the new instance or error if something goes wrong NewCreateTenantPayloadResolver( ctx context.Context, clientMutationId *string, tenantID string, tenantDetail *TenantDetail, cursor string) (CreateTenantPayloadResolverContract, error) // NewUpdateTenant creates new instance of the UpdateTenantContract, setting up all dependencies and returns the instance // ctx: Mandatory. Reference to the context // clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response // Returns the new instance or error if something goes wrong NewUpdateTenant(ctx context.Context) (UpdateTenantContract, error) // NewUpdateTenantPayloadResolver creates new instance of the UpdateTenantPayloadResolverContract, setting up all dependencies and returns the instance // ctx: Mandatory. Reference to the context // clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response // tenantID: Mandatory. The tenant unique identifier // tenantDetail: Mandatory. The tenant details // cursor: Mandatory. The edge cluster cursor // Returns the new instance or error if something goes wrong NewUpdateTenantPayloadResolver( ctx context.Context, clientMutationId *string, tenantID string, tenantDetail *TenantDetail, cursor string) (UpdateTenantPayloadResolverContract, error) // NewDeleteTenant creates new instance of the DeleteTenantContract, setting up all dependencies and returns the instance // ctx: Mandatory. Reference to the context // clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response // Returns the new instance or error if something goes wrong NewDeleteTenant(ctx context.Context) (DeleteTenantContract, error) // NewDeleteTenantPayloadResolver creates new instance of the DeleteTenantPayloadResolverContract, setting up all dependencies and returns the instance // ctx: Mandatory. Reference to the context // tenantID: Mandatory. The tenant unique identifier // clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response // Returns the new instance or error if something goes wrong NewDeleteTenantPayloadResolver( ctx context.Context, tenantID string, clientMutationId *string) (DeleteTenantPayloadResolverContract, error) }
type QueryResolverCreatorContract ¶
type QueryResolverCreatorContract interface { // NewTenantResolver creates new TenantResolverContract and returns it // ctx: Mandatory. Reference to the context // tenantID: Mandatory. The tenant unique identifier // tenantDetail: Optional. The tennat details, if provided, the value be used instead of contacting the edge cluster service // Returns the TenantResolverContract or error if something goes wrong NewTenantResolver( ctx context.Context, tenantID string, tenantDetail *TenantDetail) (TenantResolverContract, error) // NewTenantTypeEdgeResolver creates new TenantTypeEdgeResolverContract and returns it // ctx: Mandatory. Reference to the context // tenantID: Mandatory. The tenant unique identifier // tenantDetail: Optional. The tennat details, if provided, the value be used instead of contacting the edge cluster service // cursor: Mandatory. The cursor // Returns the TenantTypeEdgeResolverContract or error if something goes wrong NewTenantTypeEdgeResolver( ctx context.Context, tenantID string, cursor string, tenantDetail *TenantDetail) (TenantTypeEdgeResolverContract, error) // NewTenantTypeConnectionResolver creates new TenantTypeConnectionResolverContract and returns it // ctx: Mandatory. Reference to the context // tenants: Mandatory. Reference the list of tenants // hasPreviousPage: Mandatory. Indicates whether more edges exist prior to the set defined by the clients arguments // hasNextPage: Mandatory. Indicates whether more edges exist following the set defined by the clients arguments // totalCount: Mandatory. The total count of matched tenants // Returns the TenantTypeConnectionResolverContract or error if something goes wrong NewTenantTypeConnectionResolver( ctx context.Context, tenants []*tenantGrpcContract.TenantWithCursor, hasPreviousPage bool, hasNextPage bool, totalCount int32) (TenantTypeConnectionResolverContract, error) }
type RootResolverContract ¶
type RootResolverContract interface { // CreateTenant returns create tenant mutator // ctx: Mandatory. Reference to the context // Returns the create tenant mutator or error if something goes wrong CreateTenant( ctx context.Context, args CreateTenantInputArgument) (CreateTenantPayloadResolverContract, error) // UpdateTenant returns update tenant mutator // ctx: Mandatory. Reference to the context // Returns the update tenant mutator or error if something goes wrong UpdateTenant( ctx context.Context, args UpdateTenantInputArgument) (UpdateTenantPayloadResolverContract, error) // DeleteTenant returns delete tenant mutator // ctx: Mandatory. Reference to the context // Returns the delete tenant mutator or error if something goes wrong DeleteTenant( ctx context.Context, args DeleteTenantInputArgument) (DeleteTenantPayloadResolverContract, error) }
RootResolverContract declares the root resolver
type TenantClientContract ¶
type TenantClientContract interface { // CreateClient creats a new tenant gRPC client and returns the connection // and the client to the caller. // Returns connection and the tenant gRPC client or error if something goes wrong. CreateClient() (*grpc.ClientConn, tenantGrpcContract.TenantServiceClient, error) }
TenantClientContract wraps the tennat gRPC client to make it easy for testing
type TenantClusterEdgeClusterInputArgument ¶
type TenantClusterEdgeClusterInputArgument struct {
EdgeClusterID graphql.ID
}
type TenantDetail ¶
type TenantDetail struct {
Tenant *tenantGrpcContract.Tenant
}
type TenantEdgeClustersInputArgument ¶
type TenantEdgeClustersInputArgument struct { relay.ConnectionArgument EdgeClusterIDs *[]graphql.ID SortOption *string }
type TenantResolverContract ¶
type TenantResolverContract interface { // ID returns tenant unique identifier // ctx: Mandatory. Reference to the context // Returns the tenant unique identifier ID(ctx context.Context) graphql.ID // Name returns tenant name // ctx: Mandatory. Reference to the context // Returns the tenant name Name(ctx context.Context) string // EdgeCluster returns tenant resolver // ctx: Mandatory. Reference to the context // args: Mandatory. The argument list // Returns the tenant resolver or error if something goes wrong EdgeCluster( ctx context.Context, args TenantClusterEdgeClusterInputArgument) (edgecluster.EdgeClusterResolverContract, error) // EdgeClusters returns tenant connection compatible with graphql-relay // ctx: Mandatory. Reference to the context // args: Mandatory. The argument list // Returns the tenant resolver or error if something goes wrong EdgeClusters( ctx context.Context, args TenantEdgeClustersInputArgument) (edgecluster.EdgeClusterTypeConnectionResolverContract, error) }
TenantResolverContract declares the resolver that can retrieve tenant information
type TenantTypeConnectionResolverContract ¶
type TenantTypeConnectionResolverContract interface { // PageInfo returns the paging information compatible with graphql-relay // ctx: Mandatory. Reference to the context // Returns the paging information PageInfo(ctx context.Context) (relay.PageInfoResolverContract, error) // Edges returns the tenant edges compatible with graphql-relay // ctx: Mandatory. Reference to the context // Returns the tenant edges Edges(ctx context.Context) (*[]TenantTypeEdgeResolverContract, error) // TotalCount returns total count of the matched tenants // ctx: Mandatory. Reference to the context // Returns the total count of the matched tenants TotalCount(ctx context.Context) *int32 }
TenantTypeConnectionResolverContract declares the resolver that returns tenant edge compatible with graphql-relay
type TenantTypeEdgeResolverContract ¶
type TenantTypeEdgeResolverContract interface { // Node returns the tenant resolver // ctx: Mandatory. Reference to the context // Returns the tenant resolver or error if something goes wrong Node(ctx context.Context) (TenantResolverContract, error) // Cursor returns the cursor for the tenant edge compatible with graphql-relay // ctx: Mandatory. Reference to the context // Returns the cursor Cursor(ctx context.Context) string }
TenantTypeEdgeResolverContract declares the resolver that returns tenant edge compatible with graphql-relay
type UpdateTenantContract ¶
type UpdateTenantContract interface { // MutateAndGetPayload update an existing tenant and returns the payload contains the result of updating an existing tenant // ctx: Mandatory. Reference to the context // args: Mandatory. Reference to the input argument contains tenant information to update // Returns the updated tenant payload or error if something goes wrong MutateAndGetPayload( ctx context.Context, args UpdateTenantInputArgument) (UpdateTenantPayloadResolverContract, error) }
UpdateTenantContract declares the type to use when updating an existing tenant
type UpdateTenantInput ¶
type UpdateTenantInputArgument ¶
type UpdateTenantInputArgument struct {
Input UpdateTenantInput
}
type UpdateTenantPayloadResolverContract ¶
type UpdateTenantPayloadResolverContract interface { // Tenant returns the updated tenant inforamtion // ctx: Mandatory. Reference to the context // Returns the updated tenant inforamtion Tenant(ctx context.Context) (TenantTypeEdgeResolverContract, error) // ClientMutationId returns the client mutation ID that was provided as part of the mutation request // ctx: Mandatory. Reference to the context // Returns the provided clientMutationId as part of mutation request ClientMutationId(ctx context.Context) *string }
UpdateTenantPayloadResolverContract declares the resolver that can return the payload contains the result of updating an existing tenant