api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package api is the graphapi package

Package api is the graphapi package

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownType  = errors.New("unknown type")
	ErrTypeNotFound = errors.New("type not found")
)
View Source
var (
	// ErrInternalServerError is returned when an internal error occurs.
	ErrInternalServerError = errors.New("internal server error")
)

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Entitlement struct {
		Cancelled              func(childComplexity int) int
		CreatedAt              func(childComplexity int) int
		CreatedBy              func(childComplexity int) int
		DowngradedAt           func(childComplexity int) int
		DowngradedTier         func(childComplexity int) int
		ExpiresAt              func(childComplexity int) int
		ExternalCustomerID     func(childComplexity int) int
		ExternalSubscriptionID func(childComplexity int) int
		ID                     func(childComplexity int) int
		Owner                  func(childComplexity int) int
		Tier                   func(childComplexity int) int
		UpdatedAt              func(childComplexity int) int
		UpdatedBy              func(childComplexity int) int
		UpgradedAt             func(childComplexity int) int
		UpgradedTier           func(childComplexity int) int
	}

	EntitlementConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	EntitlementCreatePayload struct {
		Entitlement func(childComplexity int) int
	}

	EntitlementDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	EntitlementEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	EntitlementUpdatePayload struct {
		Entitlement func(childComplexity int) int
	}

	Group struct {
		CreatedAt   func(childComplexity int) int
		CreatedBy   func(childComplexity int) int
		Description func(childComplexity int) int
		DisplayName func(childComplexity int) int
		ID          func(childComplexity int) int
		LogoURL     func(childComplexity int) int
		Name        func(childComplexity int) int
		Owner       func(childComplexity int) int
		Setting     func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		UpdatedBy   func(childComplexity int) int
		Users       func(childComplexity int) int
	}

	GroupConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	GroupCreatePayload struct {
		Group func(childComplexity int) int
	}

	GroupDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	GroupEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	GroupSettings struct {
		CreatedAt    func(childComplexity int) int
		CreatedBy    func(childComplexity int) int
		ID           func(childComplexity int) int
		JoinPolicy   func(childComplexity int) int
		SyncToGithub func(childComplexity int) int
		SyncToSlack  func(childComplexity int) int
		Tags         func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
		UpdatedBy    func(childComplexity int) int
		Visibility   func(childComplexity int) int
	}

	GroupSettingsConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	GroupSettingsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	GroupUpdatePayload struct {
		Group func(childComplexity int) int
	}

	Integration struct {
		CreatedAt   func(childComplexity int) int
		CreatedBy   func(childComplexity int) int
		Description func(childComplexity int) int
		ID          func(childComplexity int) int
		Kind        func(childComplexity int) int
		Name        func(childComplexity int) int
		Owner       func(childComplexity int) int
		SecretName  func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		UpdatedBy   func(childComplexity int) int
	}

	IntegrationConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	IntegrationCreatePayload struct {
		Integration func(childComplexity int) int
	}

	IntegrationDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	IntegrationEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	IntegrationUpdatePayload struct {
		Integration func(childComplexity int) int
	}

	Mutation struct {
		CreateEntitlement         func(childComplexity int, input generated.CreateEntitlementInput) int
		CreateGroup               func(childComplexity int, input generated.CreateGroupInput) int
		CreateIntegration         func(childComplexity int, input generated.CreateIntegrationInput) int
		CreateOauthProvider       func(childComplexity int, input generated.CreateOauthProviderInput) int
		CreateOrganization        func(childComplexity int, input generated.CreateOrganizationInput) int
		CreatePersonalAccessToken func(childComplexity int, input generated.CreatePersonalAccessTokenInput) int
		CreateSession             func(childComplexity int, input generated.CreateSessionInput) int
		CreateUser                func(childComplexity int, input generated.CreateUserInput) int
		CreateUserSettingsInput   func(childComplexity int, input generated.CreateUserSettingsInput) int
		DeleteEntitlement         func(childComplexity int, id string) int
		DeleteGroup               func(childComplexity int, id string) int
		DeleteIntegration         func(childComplexity int, id string) int
		DeleteOauthProvider       func(childComplexity int, id string) int
		DeleteOrganization        func(childComplexity int, id string) int
		DeletePersonalAccessToken func(childComplexity int, id string) int
		DeleteSession             func(childComplexity int, id string) int
		DeleteUser                func(childComplexity int, id string) int
		DeleteUserSettings        func(childComplexity int, id string) int
		UpdateEntitlement         func(childComplexity int, id string, input generated.UpdateEntitlementInput) int
		UpdateGroup               func(childComplexity int, id string, input generated.UpdateGroupInput) int
		UpdateIntegration         func(childComplexity int, id string, input generated.UpdateIntegrationInput) int
		UpdateOauthProvider       func(childComplexity int, id string, input generated.UpdateOauthProviderInput) int
		UpdateOrganization        func(childComplexity int, id string, input generated.UpdateOrganizationInput) int
		UpdatePersonalAccessToken func(childComplexity int, id string, input generated.UpdatePersonalAccessTokenInput) int
		UpdateSession             func(childComplexity int, id string, input generated.UpdateSessionInput) int
		UpdateUser                func(childComplexity int, id string, input generated.UpdateUserInput) int
		UpdateUserSettingsInput   func(childComplexity int, id string, input generated.UpdateUserSettingsInput) int
	}

	OauthProvider struct {
		AuthStyle   func(childComplexity int) int
		AuthURL     func(childComplexity int) int
		ClientID    func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		CreatedBy   func(childComplexity int) int
		ID          func(childComplexity int) int
		InfoURL     func(childComplexity int) int
		Name        func(childComplexity int) int
		Owner       func(childComplexity int) int
		RedirectURL func(childComplexity int) int
		Scopes      func(childComplexity int) int
		TokenURL    func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		UpdatedBy   func(childComplexity int) int
	}

	OauthProviderConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	OauthProviderCreatePayload struct {
		OauthProvider func(childComplexity int) int
	}

	OauthProviderDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	OauthProviderEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	OauthProviderUpdatePayload struct {
		OauthProvider func(childComplexity int) int
	}

	Organization struct {
		Children      func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.OrganizationOrder, where *generated.OrganizationWhereInput) int
		CreatedAt     func(childComplexity int) int
		CreatedBy     func(childComplexity int) int
		Description   func(childComplexity int) int
		DisplayName   func(childComplexity int) int
		Entitlements  func(childComplexity int) int
		Groups        func(childComplexity int) int
		ID            func(childComplexity int) int
		Integrations  func(childComplexity int) int
		Name          func(childComplexity int) int
		Oauthprovider func(childComplexity int) int
		Parent        func(childComplexity int) int
		Setting       func(childComplexity int) int
		UpdatedAt     func(childComplexity int) int
		UpdatedBy     func(childComplexity int) int
		Users         func(childComplexity int) int
	}

	OrganizationConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	OrganizationCreatePayload struct {
		Organization func(childComplexity int) int
	}

	OrganizationDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	OrganizationEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	OrganizationSettings struct {
		BillingAddress func(childComplexity int) int
		BillingContact func(childComplexity int) int
		BillingEmail   func(childComplexity int) int
		BillingPhone   func(childComplexity int) int
		CreatedAt      func(childComplexity int) int
		CreatedBy      func(childComplexity int) int
		Domains        func(childComplexity int) int
		ID             func(childComplexity int) int
		SSOCert        func(childComplexity int) int
		SSOEntrypoint  func(childComplexity int) int
		SSOIssuer      func(childComplexity int) int
		Tags           func(childComplexity int) int
		TaxIdentifier  func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
		UpdatedBy      func(childComplexity int) int
	}

	OrganizationSettingsConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	OrganizationSettingsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	OrganizationUpdatePayload struct {
		Organization func(childComplexity int) int
	}

	PageInfo struct {
		EndCursor       func(childComplexity int) int
		HasNextPage     func(childComplexity int) int
		HasPreviousPage func(childComplexity int) int
		StartCursor     func(childComplexity int) int
	}

	PersonalAccessToken struct {
		Abilities    func(childComplexity int) int
		CreatedAt    func(childComplexity int) int
		CreatedBy    func(childComplexity int) int
		ExpirationAt func(childComplexity int) int
		ID           func(childComplexity int) int
		LastUsedAt   func(childComplexity int) int
		Name         func(childComplexity int) int
		UpdatedAt    func(childComplexity int) int
		UpdatedBy    func(childComplexity int) int
		User         func(childComplexity int) int
		UserID       func(childComplexity int) int
	}

	PersonalAccessTokenConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	PersonalAccessTokenCreatePayload struct {
		PersonalAccessToken func(childComplexity int) int
	}

	PersonalAccessTokenDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	PersonalAccessTokenEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	PersonalAccessTokenUpdatePayload struct {
		PersonalAccessToken func(childComplexity int) int
	}

	Query struct {
		Entitlement               func(childComplexity int, id string) int
		Entitlements              func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.EntitlementWhereInput) int
		Group                     func(childComplexity int, id string) int
		GroupSettingsSlice        func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.GroupSettingsWhereInput) int
		Groups                    func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.GroupOrder, where *generated.GroupWhereInput) int
		Integration               func(childComplexity int, id string) int
		Integrations              func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.IntegrationOrder, where *generated.IntegrationWhereInput) int
		Node                      func(childComplexity int, id string) int
		Nodes                     func(childComplexity int, ids []string) int
		OauthProvider             func(childComplexity int, id string) int
		OauthProviders            func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.OauthProviderWhereInput) int
		Organization              func(childComplexity int, id string) int
		OrganizationSettingsSlice func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.OrganizationSettingsWhereInput) int
		Organizations             func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.OrganizationOrder, where *generated.OrganizationWhereInput) int
		PersonalAccessToken       func(childComplexity int, id string) int
		PersonalAccessTokens      func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.PersonalAccessTokenWhereInput) int
		Session                   func(childComplexity int, id string) int
		Sessions                  func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.SessionWhereInput) int
		User                      func(childComplexity int, id string) int
		UserSettings              func(childComplexity int, id string) int
		UserSettingsSlice         func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.UserSettingsWhereInput) int
		Users                     func(childComplexity int, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.UserOrder, where *generated.UserWhereInput) int
		// contains filtered or unexported fields
	}

	RefreshToken struct {
		ClaimsEmail             func(childComplexity int) int
		ClaimsEmailVerified     func(childComplexity int) int
		ClaimsGroups            func(childComplexity int) int
		ClaimsPreferredUsername func(childComplexity int) int
		ClaimsUserID            func(childComplexity int) int
		ClaimsUsername          func(childComplexity int) int
		ClientID                func(childComplexity int) int
		ConnectorData           func(childComplexity int) int
		ConnectorID             func(childComplexity int) int
		ID                      func(childComplexity int) int
		LastUsed                func(childComplexity int) int
		Nonce                   func(childComplexity int) int
		ObsoleteToken           func(childComplexity int) int
		Scopes                  func(childComplexity int) int
		Token                   func(childComplexity int) int
		User                    func(childComplexity int) int
	}

	Session struct {
		CreatedAt func(childComplexity int) int
		CreatedBy func(childComplexity int) int
		Disabled  func(childComplexity int) int
		ID        func(childComplexity int) int
		Ips       func(childComplexity int) int
		Token     func(childComplexity int) int
		Type      func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		UpdatedBy func(childComplexity int) int
		UserAgent func(childComplexity int) int
		Users     func(childComplexity int) int
	}

	SessionConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	SessionCreatePayload struct {
		Session func(childComplexity int) int
	}

	SessionDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	SessionEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	SessionUpdatePayload struct {
		Session func(childComplexity int) int
	}

	User struct {
		AvatarLocalFile      func(childComplexity int) int
		AvatarRemoteURL      func(childComplexity int) int
		AvatarUpdatedAt      func(childComplexity int) int
		CreatedAt            func(childComplexity int) int
		CreatedBy            func(childComplexity int) int
		DisplayName          func(childComplexity int) int
		Email                func(childComplexity int) int
		FirstName            func(childComplexity int) int
		Groups               func(childComplexity int) int
		ID                   func(childComplexity int) int
		LastName             func(childComplexity int) int
		LastSeen             func(childComplexity int) int
		Organizations        func(childComplexity int) int
		PersonalAccessTokens func(childComplexity int) int
		Refreshtoken         func(childComplexity int) int
		Sessions             func(childComplexity int) int
		Setting              func(childComplexity int) int
		UpdatedAt            func(childComplexity int) int
		UpdatedBy            func(childComplexity int) int
	}

	UserConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	UserCreatePayload struct {
		User func(childComplexity int) int
	}

	UserDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	UserEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	UserSettings struct {
		CreatedAt      func(childComplexity int) int
		CreatedBy      func(childComplexity int) int
		EmailConfirmed func(childComplexity int) int
		ID             func(childComplexity int) int
		Locked         func(childComplexity int) int
		Permissions    func(childComplexity int) int
		Role           func(childComplexity int) int
		SilencedAt     func(childComplexity int) int
		Status         func(childComplexity int) int
		SuspendedAt    func(childComplexity int) int
		Tags           func(childComplexity int) int
		UpdatedAt      func(childComplexity int) int
		UpdatedBy      func(childComplexity int) int
	}

	UserSettingsConnection struct {
		Edges      func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	UserSettingsCreatePayload struct {
		UserSettings func(childComplexity int) int
	}

	UserSettingsDeletePayload struct {
		DeletedID func(childComplexity int) int
	}

	UserSettingsEdge struct {
		Cursor func(childComplexity int) int
		Node   func(childComplexity int) int
	}

	UserSettingsUpdatePayload struct {
		UserSettings func(childComplexity int) int
	}

	UserUpdatePayload struct {
		User func(childComplexity int) int
	}
	// contains filtered or unexported fields
}

type Config

type Config struct {
	Schema     *ast.Schema
	Resolvers  ResolverRoot
	Directives DirectiveRoot
	Complexity ComplexityRoot
}

type CreateOauthProviderInputResolver

type CreateOauthProviderInputResolver interface {
	AuthStyle(ctx context.Context, obj *generated.CreateOauthProviderInput, data int) error
}

type DirectiveRoot

type DirectiveRoot struct {
}

type EntitlementCreatePayload

type EntitlementCreatePayload struct {
	// Created entitlement
	Entitlement *generated.Entitlement `json:"entitlement"`
}

Return response for createEntitlement mutation

type EntitlementDeletePayload

type EntitlementDeletePayload struct {
	// Deleted entitlement ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteEntitlement mutation

type EntitlementUpdatePayload

type EntitlementUpdatePayload struct {
	// Updated entitlement
	Entitlement *generated.Entitlement `json:"entitlement"`
}

Return response for updateEntitlement mutation

type GroupCreatePayload

type GroupCreatePayload struct {
	// Created group
	Group *generated.Group `json:"group"`
}

Return response for createGroup mutation

type GroupDeletePayload

type GroupDeletePayload struct {
	// Deleted group ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteGroup mutation

type GroupUpdatePayload

type GroupUpdatePayload struct {
	// Updated group
	Group *generated.Group `json:"group"`
}

Return response for updateGroup mutation

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is an http handler wrapping a Resolver

func (*Handler) Handler

func (h *Handler) Handler() http.HandlerFunc

Handler returns the http.HandlerFunc for the GraphAPI

func (*Handler) Routes

func (h *Handler) Routes(e *echo.Group)

Routes for the the server

type IntegrationCreatePayload

type IntegrationCreatePayload struct {
	// Created integration
	Integration *generated.Integration `json:"integration"`
}

Return response for createIntegration mutation

type IntegrationDeletePayload

type IntegrationDeletePayload struct {
	// Deleted integration ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteIntegration mutation

type IntegrationUpdatePayload

type IntegrationUpdatePayload struct {
	// Updated integration
	Integration *generated.Integration `json:"integration"`
}

Return response for updateIntegration mutation

type MutationResolver

type MutationResolver interface {
	CreateEntitlement(ctx context.Context, input generated.CreateEntitlementInput) (*EntitlementCreatePayload, error)
	UpdateEntitlement(ctx context.Context, id string, input generated.UpdateEntitlementInput) (*EntitlementUpdatePayload, error)
	DeleteEntitlement(ctx context.Context, id string) (*EntitlementDeletePayload, error)
	CreateGroup(ctx context.Context, input generated.CreateGroupInput) (*GroupCreatePayload, error)
	UpdateGroup(ctx context.Context, id string, input generated.UpdateGroupInput) (*GroupUpdatePayload, error)
	DeleteGroup(ctx context.Context, id string) (*GroupDeletePayload, error)
	CreateIntegration(ctx context.Context, input generated.CreateIntegrationInput) (*IntegrationCreatePayload, error)
	UpdateIntegration(ctx context.Context, id string, input generated.UpdateIntegrationInput) (*IntegrationUpdatePayload, error)
	DeleteIntegration(ctx context.Context, id string) (*IntegrationDeletePayload, error)
	CreateOauthProvider(ctx context.Context, input generated.CreateOauthProviderInput) (*OauthProviderCreatePayload, error)
	UpdateOauthProvider(ctx context.Context, id string, input generated.UpdateOauthProviderInput) (*OauthProviderUpdatePayload, error)
	DeleteOauthProvider(ctx context.Context, id string) (*OauthProviderDeletePayload, error)
	CreateOrganization(ctx context.Context, input generated.CreateOrganizationInput) (*OrganizationCreatePayload, error)
	UpdateOrganization(ctx context.Context, id string, input generated.UpdateOrganizationInput) (*OrganizationUpdatePayload, error)
	DeleteOrganization(ctx context.Context, id string) (*OrganizationDeletePayload, error)
	CreatePersonalAccessToken(ctx context.Context, input generated.CreatePersonalAccessTokenInput) (*PersonalAccessTokenCreatePayload, error)
	UpdatePersonalAccessToken(ctx context.Context, id string, input generated.UpdatePersonalAccessTokenInput) (*PersonalAccessTokenUpdatePayload, error)
	DeletePersonalAccessToken(ctx context.Context, id string) (*PersonalAccessTokenDeletePayload, error)
	CreateSession(ctx context.Context, input generated.CreateSessionInput) (*SessionCreatePayload, error)
	UpdateSession(ctx context.Context, id string, input generated.UpdateSessionInput) (*SessionUpdatePayload, error)
	DeleteSession(ctx context.Context, id string) (*SessionDeletePayload, error)
	CreateUser(ctx context.Context, input generated.CreateUserInput) (*UserCreatePayload, error)
	UpdateUser(ctx context.Context, id string, input generated.UpdateUserInput) (*UserUpdatePayload, error)
	DeleteUser(ctx context.Context, id string) (*UserDeletePayload, error)
	CreateUserSettingsInput(ctx context.Context, input generated.CreateUserSettingsInput) (*UserSettingsCreatePayload, error)
	UpdateUserSettingsInput(ctx context.Context, id string, input generated.UpdateUserSettingsInput) (*UserSettingsUpdatePayload, error)
	DeleteUserSettings(ctx context.Context, id string) (*UserSettingsDeletePayload, error)
}

type OauthProviderCreatePayload

type OauthProviderCreatePayload struct {
	// Created oauthprovider
	OauthProvider *generated.OauthProvider `json:"OauthProvider"`
}

Return response for createOauthprovider mutation

type OauthProviderDeletePayload

type OauthProviderDeletePayload struct {
	// Deleted oauthprovider ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteOauthprovider mutation

type OauthProviderResolver

type OauthProviderResolver interface {
	AuthStyle(ctx context.Context, obj *generated.OauthProvider) (int, error)
}

type OauthProviderUpdatePayload

type OauthProviderUpdatePayload struct {
	// Updated oauthprovider
	OauthProvider *generated.OauthProvider `json:"OauthProvider"`
}

Return response for updateOauthprovider mutation

type OauthProviderWhereInputResolver

type OauthProviderWhereInputResolver interface {
	AuthStyle(ctx context.Context, obj *generated.OauthProviderWhereInput, data *int) error
	AuthStyleNeq(ctx context.Context, obj *generated.OauthProviderWhereInput, data *int) error
	AuthStyleIn(ctx context.Context, obj *generated.OauthProviderWhereInput, data []int) error
	AuthStyleNotIn(ctx context.Context, obj *generated.OauthProviderWhereInput, data []int) error
	AuthStyleGt(ctx context.Context, obj *generated.OauthProviderWhereInput, data *int) error
	AuthStyleGte(ctx context.Context, obj *generated.OauthProviderWhereInput, data *int) error
	AuthStyleLt(ctx context.Context, obj *generated.OauthProviderWhereInput, data *int) error
	AuthStyleLte(ctx context.Context, obj *generated.OauthProviderWhereInput, data *int) error
}

type OrganizationCreatePayload

type OrganizationCreatePayload struct {
	// Created organization
	Organization *generated.Organization `json:"organization"`
}

Return response for createOrganization mutation

type OrganizationDeletePayload

type OrganizationDeletePayload struct {
	// Deleted organization ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteOrganization mutation

type OrganizationUpdatePayload

type OrganizationUpdatePayload struct {
	// Updated organization
	Organization *generated.Organization `json:"organization"`
}

Return response for updateOrganization mutation

type PersonalAccessTokenCreatePayload

type PersonalAccessTokenCreatePayload struct {
	// Created PersonalAccessToken
	PersonalAccessToken *generated.PersonalAccessToken `json:"PersonalAccessToken"`
}

Return response for createPersonalAccessToken mutation

type PersonalAccessTokenDeletePayload

type PersonalAccessTokenDeletePayload struct {
	// Deleted PersonalAccessToken ID
	DeletedID string `json:"deletedID"`
}

Return response for deletePersonalAccessToken mutation

type PersonalAccessTokenUpdatePayload

type PersonalAccessTokenUpdatePayload struct {
	// Updated PersonalAccessToken
	PersonalAccessToken *generated.PersonalAccessToken `json:"PersonalAccessToken"`
}

Return response for updatePersonalAccessToken mutation

type QueryResolver

type QueryResolver interface {
	Node(ctx context.Context, id string) (generated.Noder, error)
	Nodes(ctx context.Context, ids []string) ([]generated.Noder, error)
	Entitlements(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.EntitlementWhereInput) (*generated.EntitlementConnection, error)
	Groups(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.GroupOrder, where *generated.GroupWhereInput) (*generated.GroupConnection, error)
	GroupSettingsSlice(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.GroupSettingsWhereInput) (*generated.GroupSettingsConnection, error)
	Integrations(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.IntegrationOrder, where *generated.IntegrationWhereInput) (*generated.IntegrationConnection, error)
	OauthProviders(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.OauthProviderWhereInput) (*generated.OauthProviderConnection, error)
	Organizations(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.OrganizationOrder, where *generated.OrganizationWhereInput) (*generated.OrganizationConnection, error)
	OrganizationSettingsSlice(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.OrganizationSettingsWhereInput) (*generated.OrganizationSettingsConnection, error)
	PersonalAccessTokens(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.PersonalAccessTokenWhereInput) (*generated.PersonalAccessTokenConnection, error)
	Sessions(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.SessionWhereInput) (*generated.SessionConnection, error)
	Users(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, orderBy *generated.UserOrder, where *generated.UserWhereInput) (*generated.UserConnection, error)
	UserSettingsSlice(ctx context.Context, after *entgql.Cursor[string], first *int, before *entgql.Cursor[string], last *int, where *generated.UserSettingsWhereInput) (*generated.UserSettingsConnection, error)
	Entitlement(ctx context.Context, id string) (*generated.Entitlement, error)
	Group(ctx context.Context, id string) (*generated.Group, error)
	Integration(ctx context.Context, id string) (*generated.Integration, error)
	OauthProvider(ctx context.Context, id string) (*generated.OauthProvider, error)
	Organization(ctx context.Context, id string) (*generated.Organization, error)
	PersonalAccessToken(ctx context.Context, id string) (*generated.PersonalAccessToken, error)
	Session(ctx context.Context, id string) (*generated.Session, error)
	User(ctx context.Context, id string) (*generated.User, error)
	UserSettings(ctx context.Context, id string) (*generated.UserSettings, error)
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver provides a graph response resolver

func NewResolver

func NewResolver(client *ent.Client, logger *zap.SugaredLogger) *Resolver

NewResolver returns a resolver configured with the given ent client

func (*Resolver) CreateOauthProviderInput

func (r *Resolver) CreateOauthProviderInput() CreateOauthProviderInputResolver

CreateOauthProviderInput returns CreateOauthProviderInputResolver implementation.

func (*Resolver) Handler

func (r *Resolver) Handler(withPlayground bool, middleware ...echo.MiddlewareFunc) *Handler

Handler returns an http handler for a graph resolver

func (*Resolver) Mutation

func (r *Resolver) Mutation() MutationResolver

Mutation returns MutationResolver implementation.

func (*Resolver) OauthProvider

func (r *Resolver) OauthProvider() OauthProviderResolver

OauthProvider returns OauthProviderResolver implementation.

func (*Resolver) OauthProviderWhereInput

func (r *Resolver) OauthProviderWhereInput() OauthProviderWhereInputResolver

OauthProviderWhereInput returns OauthProviderWhereInputResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() QueryResolver

Query returns QueryResolver implementation.

func (*Resolver) UpdateOauthProviderInput

func (r *Resolver) UpdateOauthProviderInput() UpdateOauthProviderInputResolver

UpdateOauthProviderInput returns UpdateOauthProviderInputResolver implementation.

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	OauthProvider() OauthProviderResolver
	Query() QueryResolver
	CreateOauthProviderInput() CreateOauthProviderInputResolver
	OauthProviderWhereInput() OauthProviderWhereInputResolver
	UpdateOauthProviderInput() UpdateOauthProviderInputResolver
}

type SessionCreatePayload

type SessionCreatePayload struct {
	// Created session
	Session *generated.Session `json:"session"`
}

Return response for createSession mutation

type SessionDeletePayload

type SessionDeletePayload struct {
	// Deleted session ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteSession mutation

type SessionUpdatePayload

type SessionUpdatePayload struct {
	// Updated session
	Session *generated.Session `json:"session"`
}

Return response for updateSession mutation

type UpdateOauthProviderInputResolver

type UpdateOauthProviderInputResolver interface {
	AuthStyle(ctx context.Context, obj *generated.UpdateOauthProviderInput, data *int) error
}

type UserCreatePayload

type UserCreatePayload struct {
	// Created user
	User *generated.User `json:"user"`
}

Return response for createUser mutation

type UserDeletePayload

type UserDeletePayload struct {
	// Deleted user ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteUser mutation

type UserSettingsCreatePayload

type UserSettingsCreatePayload struct {
	// Created UserSettings
	UserSettings *generated.UserSettings `json:"UserSettings"`
}

Return response for createUserSettings mutation

type UserSettingsDeletePayload

type UserSettingsDeletePayload struct {
	// Deleted UserSettings ID
	DeletedID string `json:"deletedID"`
}

Return response for deleteUserSettings mutation

type UserSettingsUpdatePayload

type UserSettingsUpdatePayload struct {
	// Updated UserSettings
	UserSettings *generated.UserSettings `json:"UserSettings"`
}

Return response for updateUserSettings mutation

type UserUpdatePayload

type UserUpdatePayload struct {
	// Updated user
	User *generated.User `json:"user"`
}

Return response for updateUser mutation

Jump to

Keyboard shortcuts

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