generated

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutableSchema

func NewExecutableSchema(cfg Config) graphql.ExecutableSchema

NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.

Types

type ComplexityRoot

type ComplexityRoot struct {
	Account struct {
		ClientURI         func(childComplexity int) int
		Contacts          func(childComplexity int) int
		CreatedAt         func(childComplexity int) int
		Description       func(childComplexity int) int
		ID                func(childComplexity int) int
		LogoURI           func(childComplexity int) int
		PolicyURI         func(childComplexity int) int
		Status            func(childComplexity int) int
		StatusMessage     func(childComplexity int) int
		TermsOfServiceURI func(childComplexity int) int
		Title             func(childComplexity int) int
		UpdatedAt         func(childComplexity int) int
	}

	AccountConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

	AccountCreatePayload struct {
		Account          func(childComplexity int) int
		ClientMutationID func(childComplexity int) int
		Owner            func(childComplexity int) int
	}

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

	AccountPayload struct {
		Account          func(childComplexity int) int
		AccountID        func(childComplexity int) int
		ClientMutationID func(childComplexity int) int
	}

	AuthClient struct {
		AccountID          func(childComplexity int) int
		AllowedCORSOrigins func(childComplexity int) int
		Audience           func(childComplexity int) int
		CreatedAt          func(childComplexity int) int
		DeletedAt          func(childComplexity int) int
		ExpiresAt          func(childComplexity int) int
		GrantTypes         func(childComplexity int) int
		ID                 func(childComplexity int) int
		Public             func(childComplexity int) int
		RedirectURIs       func(childComplexity int) int
		ResponseTypes      func(childComplexity int) int
		Scope              func(childComplexity int) int
		Secret             func(childComplexity int) int
		SubjectType        func(childComplexity int) int
		Title              func(childComplexity int) int
		UpdatedAt          func(childComplexity int) int
		UserID             func(childComplexity int) int
	}

	AuthClientConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

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

	AuthClientPayload struct {
		AuthClient       func(childComplexity int) int
		AuthClientID     func(childComplexity int) int
		ClientMutationID func(childComplexity int) int
	}

	DirectAccessToken struct {
		AccountID   func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		Description func(childComplexity int) int
		ExpiresAt   func(childComplexity int) int
		ID          func(childComplexity int) int
		Token       func(childComplexity int) int
		UserID      func(childComplexity int) int
	}

	DirectAccessTokenConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

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

	DirectAccessTokenPayload struct {
		ClientMutationID func(childComplexity int) int
		Token            func(childComplexity int) int
	}

	HistoryAction struct {
		AccountID  func(childComplexity int) int
		ActionAt   func(childComplexity int) int
		Data       func(childComplexity int) int
		ID         func(childComplexity int) int
		Message    func(childComplexity int) int
		Name       func(childComplexity int) int
		ObjectID   func(childComplexity int) int
		ObjectIDs  func(childComplexity int) int
		ObjectType func(childComplexity int) int
		RequestID  func(childComplexity int) int
		UserID     func(childComplexity int) int
	}

	HistoryActionConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

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

	HistoryActionPayload struct {
		Action           func(childComplexity int) int
		ActionID         func(childComplexity int) int
		ClientMutationID func(childComplexity int) int
	}

	Member struct {
		Account   func(childComplexity int) int
		CreatedAt func(childComplexity int) int
		DeletedAt func(childComplexity int) int
		ID        func(childComplexity int) int
		IsAdmin   func(childComplexity int) int
		Roles     func(childComplexity int) int
		Status    func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		User      func(childComplexity int) int
	}

	MemberConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

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

	MemberPayload struct {
		ClientMutationID func(childComplexity int) int
		Member           func(childComplexity int) int
		MemberID         func(childComplexity int) int
	}

	Mutation struct {
		ApproveAccount            func(childComplexity int, id uint64, msg string) int
		ApproveAccountMember      func(childComplexity int, memberID uint64, msg string) int
		ApproveUser               func(childComplexity int, id uint64, msg *string) int
		CreateAuthClient          func(childComplexity int, input models.AuthClientInput) int
		CreateRole                func(childComplexity int, input models.RBACRoleInput) int
		CreateUser                func(childComplexity int, input models.UserInput) int
		DeleteAuthClient          func(childComplexity int, id string, msg *string) int
		DeleteRole                func(childComplexity int, id uint64, msg *string) int
		DisconnectSocialAccount   func(childComplexity int, id uint64) int
		GenerateDirectAccessToken func(childComplexity int, userID *uint64, description string, expiresAt *time.Time) int
		InviteAccountMember       func(childComplexity int, accountID uint64, member models.InviteMemberInput) int
		Login                     func(childComplexity int, login string, password string) int
		Logout                    func(childComplexity int) int
		Poke                      func(childComplexity int) int
		RegisterAccount           func(childComplexity int, input models.AccountCreateInput) int
		RejectAccount             func(childComplexity int, id uint64, msg string) int
		RejectAccountMember       func(childComplexity int, memberID uint64, msg string) int
		RejectUser                func(childComplexity int, id uint64, msg *string) int
		RemoveAccountMember       func(childComplexity int, memberID uint64) int
		ResetUserPassword         func(childComplexity int, email string) int
		RevokeDirectAccessToken   func(childComplexity int, filter models.DirectAccessTokenListFilter) int
		SetOption                 func(childComplexity int, name string, input models.OptionInput) int
		SwitchAccount             func(childComplexity int, id uint64) int
		UpdateAccount             func(childComplexity int, id uint64, input models.AccountInput) int
		UpdateAccountMember       func(childComplexity int, memberID uint64, member models.MemberInput) int
		UpdateAuthClient          func(childComplexity int, id string, input models.AuthClientInput) int
		UpdateRole                func(childComplexity int, id uint64, input models.RBACRoleInput) int
		UpdateUser                func(childComplexity int, id uint64, input models.UserInput) int
		UpdateUserPassword        func(childComplexity int, token string, email string, password string) int
	}

	Option struct {
		Name       func(childComplexity int) int
		OptionType func(childComplexity int) int
		TargetID   func(childComplexity int) int
		Value      func(childComplexity int) int
	}

	OptionConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

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

	OptionPayload struct {
		ClientMutationID func(childComplexity int) int
		Option           func(childComplexity int) int
		OptionName       func(childComplexity int) int
	}

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

	Profile struct {
		About       func(childComplexity int) int
		CompanyName func(childComplexity int) int
		CreatedAt   func(childComplexity int) int
		Email       func(childComplexity int) int
		FirstName   func(childComplexity int) int
		ID          func(childComplexity int) int
		LastName    func(childComplexity int) int
		Messgangers func(childComplexity int) int
		UpdatedAt   func(childComplexity int) int
		User        func(childComplexity int) int
	}

	ProfileMessanger struct {
		Address func(childComplexity int) int
		Mtype   func(childComplexity int) int
	}

	Query struct {
		Account                        func(childComplexity int, id uint64) int
		AuthClient                     func(childComplexity int, id string) int
		CheckPermission                func(childComplexity int, name string, key *string, targetID *string, idKey *string) int
		CurrentAccount                 func(childComplexity int) int
		CurrentSession                 func(childComplexity int) int
		CurrentSocialAccounts          func(childComplexity int, filter *models.SocialAccountListFilter, order *models.SocialAccountListOrder) int
		CurrentUser                    func(childComplexity int) int
		GetDirectAccessToken           func(childComplexity int, id uint64) int
		ListAccountRolesAndPermissions func(childComplexity int, accountID uint64, order *models.RBACRoleListOrder) int
		ListAccounts                   func(childComplexity int, filter *models.AccountListFilter, order *models.AccountListOrder, page *models.Page) int
		ListAuthClients                func(childComplexity int, filter *models.AuthClientListFilter, order *models.AuthClientListOrder, page *models.Page) int
		ListDirectAccessTokens         func(childComplexity int, filter *models.DirectAccessTokenListFilter, order *models.DirectAccessTokenListOrder, page *models.Page) int
		ListHistory                    func(childComplexity int, filter *models.HistoryActionListFilter, order *models.HistoryActionListOrder, page *models.Page) int
		ListMembers                    func(childComplexity int, filter *models.MemberListFilter, order *models.MemberListOrder, page *models.Page) int
		ListMyPermissions              func(childComplexity int, patterns []string) int
		ListOptions                    func(childComplexity int, filter *models.OptionListFilter, order *models.OptionListOrder, page *models.Page) int
		ListPermissions                func(childComplexity int, patterns []string) int
		ListRoles                      func(childComplexity int, filter *models.RBACRoleListFilter, order *models.RBACRoleListOrder, page *models.Page) int
		ListSocialAccounts             func(childComplexity int, filter *models.SocialAccountListFilter, order *models.SocialAccountListOrder, page *models.Page) int
		ListUsers                      func(childComplexity int, filter *models.UserListFilter, order *models.UserListOrder, page *models.Page) int
		Option                         func(childComplexity int, name string, optionType models.OptionType, targetID uint64) int
		Role                           func(childComplexity int, id uint64) int
		ServiceVersion                 func(childComplexity int) int
		SocialAccount                  func(childComplexity int, id uint64) int
		User                           func(childComplexity int, id uint64, username string) int
	}

	RBACPermission struct {
		Access      func(childComplexity int) int
		Description func(childComplexity int) int
		Fullname    func(childComplexity int) int
		Name        func(childComplexity int) int
		Object      func(childComplexity int) int
	}

	RBACRole struct {
		ChildRoles         func(childComplexity int) int
		Context            func(childComplexity int) int
		CreatedAt          func(childComplexity int) int
		DeletedAt          func(childComplexity int) int
		Description        func(childComplexity int) int
		ID                 func(childComplexity int) int
		Name               func(childComplexity int) int
		PermissionPatterns func(childComplexity int) int
		Permissions        func(childComplexity int) int
		Title              func(childComplexity int) int
		UpdatedAt          func(childComplexity int) int
	}

	RBACRoleConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

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

	RBACRolePayload struct {
		ClientMutationID func(childComplexity int) int
		Role             func(childComplexity int) int
		RoleID           func(childComplexity int) int
	}

	SessionToken struct {
		ExpiresAt func(childComplexity int) int
		IsAdmin   func(childComplexity int) int
		Roles     func(childComplexity int) int
		Token     func(childComplexity int) int
	}

	SocialAccount struct {
		Avatar    func(childComplexity int) int
		CreatedAt func(childComplexity int) int
		Data      func(childComplexity int) int
		DeletedAt func(childComplexity int) int
		Email     func(childComplexity int) int
		FirstName func(childComplexity int) int
		ID        func(childComplexity int) int
		LastName  func(childComplexity int) int
		Link      func(childComplexity int) int
		Provider  func(childComplexity int) int
		Sessions  func(childComplexity int) int
		SocialID  func(childComplexity int) int
		UpdatedAt func(childComplexity int) int
		UserID    func(childComplexity int) int
		Username  func(childComplexity int) int
	}

	SocialAccountConnection struct {
		Edges      func(childComplexity int) int
		List       func(childComplexity int) int
		PageInfo   func(childComplexity int) int
		TotalCount func(childComplexity int) int
	}

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

	SocialAccountPayload struct {
		ClientMutationID func(childComplexity int) int
		SocialAccount    func(childComplexity int) int
		SocialAccountID  func(childComplexity int) int
	}

	SocialAccountSession struct {
		AccessToken     func(childComplexity int) int
		CreatedAt       func(childComplexity int) int
		DeletedAt       func(childComplexity int) int
		ExpiresAt       func(childComplexity int) int
		Name            func(childComplexity int) int
		RefreshToken    func(childComplexity int) int
		Scope           func(childComplexity int) int
		SocialAccountID func(childComplexity int) int
		TokenType       func(childComplexity int) int
		UpdatedAt       func(childComplexity int) int
	}

	StatusResponse struct {
		ClientMutationID func(childComplexity int) int
		Message          func(childComplexity int) int
		Status           func(childComplexity int) int
	}

	User struct {
		CreatedAt     func(childComplexity int) int
		ID            func(childComplexity int) int
		Status        func(childComplexity int) int
		StatusMessage func(childComplexity int) int
		UpdatedAt     func(childComplexity int) int
		Username      func(childComplexity int) int
	}

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

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

	UserPayload struct {
		ClientMutationID func(childComplexity int) int
		User             func(childComplexity int) int
		UserID           func(childComplexity int) int
	}
}

type Config

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

type DirectiveRoot

type DirectiveRoot struct {
	Acl               func(ctx context.Context, obj interface{}, next graphql.Resolver, permissions []string) (res interface{}, err error)
	Auth              func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)
	HasPermissions    func(ctx context.Context, obj interface{}, next graphql.Resolver, permissions []string) (res interface{}, err error)
	SkipNoPermissions func(ctx context.Context, obj interface{}, next graphql.Resolver, permissions []string) (res interface{}, err error)
}

type MutationResolver

type MutationResolver interface {
	Poke(ctx context.Context) (string, error)
	Login(ctx context.Context, login string, password string) (*models.SessionToken, error)
	Logout(ctx context.Context) (bool, error)
	SwitchAccount(ctx context.Context, id uint64) (*models.SessionToken, error)
	RegisterAccount(ctx context.Context, input models.AccountCreateInput) (*models.AccountCreatePayload, error)
	UpdateAccount(ctx context.Context, id uint64, input models.AccountInput) (*models.AccountPayload, error)
	ApproveAccount(ctx context.Context, id uint64, msg string) (*models.AccountPayload, error)
	RejectAccount(ctx context.Context, id uint64, msg string) (*models.AccountPayload, error)
	InviteAccountMember(ctx context.Context, accountID uint64, member models.InviteMemberInput) (*models.MemberPayload, error)
	UpdateAccountMember(ctx context.Context, memberID uint64, member models.MemberInput) (*models.MemberPayload, error)
	RemoveAccountMember(ctx context.Context, memberID uint64) (*models.MemberPayload, error)
	ApproveAccountMember(ctx context.Context, memberID uint64, msg string) (*models.MemberPayload, error)
	RejectAccountMember(ctx context.Context, memberID uint64, msg string) (*models.MemberPayload, error)
	DisconnectSocialAccount(ctx context.Context, id uint64) (*models.SocialAccountPayload, error)
	CreateUser(ctx context.Context, input models.UserInput) (*models.UserPayload, error)
	UpdateUser(ctx context.Context, id uint64, input models.UserInput) (*models.UserPayload, error)
	ApproveUser(ctx context.Context, id uint64, msg *string) (*models.UserPayload, error)
	RejectUser(ctx context.Context, id uint64, msg *string) (*models.UserPayload, error)
	ResetUserPassword(ctx context.Context, email string) (*models.StatusResponse, error)
	UpdateUserPassword(ctx context.Context, token string, email string, password string) (*models.StatusResponse, error)
	CreateAuthClient(ctx context.Context, input models.AuthClientInput) (*models.AuthClientPayload, error)
	UpdateAuthClient(ctx context.Context, id string, input models.AuthClientInput) (*models.AuthClientPayload, error)
	DeleteAuthClient(ctx context.Context, id string, msg *string) (*models.AuthClientPayload, error)
	GenerateDirectAccessToken(ctx context.Context, userID *uint64, description string, expiresAt *time.Time) (*models.DirectAccessTokenPayload, error)
	RevokeDirectAccessToken(ctx context.Context, filter models.DirectAccessTokenListFilter) (*models.StatusResponse, error)
	SetOption(ctx context.Context, name string, input models.OptionInput) (*models.OptionPayload, error)
	CreateRole(ctx context.Context, input models.RBACRoleInput) (*models.RBACRolePayload, error)
	UpdateRole(ctx context.Context, id uint64, input models.RBACRoleInput) (*models.RBACRolePayload, error)
	DeleteRole(ctx context.Context, id uint64, msg *string) (*models.RBACRolePayload, error)
}

type QueryResolver

type QueryResolver interface {
	ServiceVersion(ctx context.Context) (string, error)
	CurrentSession(ctx context.Context) (*models.SessionToken, error)
	CurrentAccount(ctx context.Context) (*models.AccountPayload, error)
	Account(ctx context.Context, id uint64) (*models.AccountPayload, error)
	ListAccounts(ctx context.Context, filter *models.AccountListFilter, order *models.AccountListOrder, page *models.Page) (*connectors.CollectionConnection[models.Account, models.AccountEdge], error)
	ListAccountRolesAndPermissions(ctx context.Context, accountID uint64, order *models.RBACRoleListOrder) (*connectors.CollectionConnection[models.RBACRole, models.RBACRoleEdge], error)
	ListMembers(ctx context.Context, filter *models.MemberListFilter, order *models.MemberListOrder, page *models.Page) (*connectors.CollectionConnection[models.Member, models.MemberEdge], error)
	SocialAccount(ctx context.Context, id uint64) (*models.SocialAccountPayload, error)
	CurrentSocialAccounts(ctx context.Context, filter *models.SocialAccountListFilter, order *models.SocialAccountListOrder) (*connectors.CollectionConnection[models.SocialAccount, models.SocialAccountEdge], error)
	ListSocialAccounts(ctx context.Context, filter *models.SocialAccountListFilter, order *models.SocialAccountListOrder, page *models.Page) (*connectors.CollectionConnection[models.SocialAccount, models.SocialAccountEdge], error)
	CurrentUser(ctx context.Context) (*models.UserPayload, error)
	User(ctx context.Context, id uint64, username string) (*models.UserPayload, error)
	ListUsers(ctx context.Context, filter *models.UserListFilter, order *models.UserListOrder, page *models.Page) (*connectors.CollectionConnection[models.User, models.UserEdge], error)
	AuthClient(ctx context.Context, id string) (*models.AuthClientPayload, error)
	ListAuthClients(ctx context.Context, filter *models.AuthClientListFilter, order *models.AuthClientListOrder, page *models.Page) (*connectors.CollectionConnection[models.AuthClient, models.AuthClientEdge], error)
	GetDirectAccessToken(ctx context.Context, id uint64) (*models.DirectAccessTokenPayload, error)
	ListDirectAccessTokens(ctx context.Context, filter *models.DirectAccessTokenListFilter, order *models.DirectAccessTokenListOrder, page *models.Page) (*connectors.CollectionConnection[models.DirectAccessToken, models.DirectAccessTokenEdge], error)
	ListHistory(ctx context.Context, filter *models.HistoryActionListFilter, order *models.HistoryActionListOrder, page *models.Page) (*connectors.CollectionConnection[models.HistoryAction, models.HistoryActionEdge], error)
	Option(ctx context.Context, name string, optionType models.OptionType, targetID uint64) (*models.OptionPayload, error)
	ListOptions(ctx context.Context, filter *models.OptionListFilter, order *models.OptionListOrder, page *models.Page) (*connectors.CollectionConnection[models.Option, models.OptionEdge], error)
	Role(ctx context.Context, id uint64) (*models.RBACRolePayload, error)
	CheckPermission(ctx context.Context, name string, key *string, targetID *string, idKey *string) (*string, error)
	ListRoles(ctx context.Context, filter *models.RBACRoleListFilter, order *models.RBACRoleListOrder, page *models.Page) (*connectors.CollectionConnection[models.RBACRole, models.RBACRoleEdge], error)
	ListPermissions(ctx context.Context, patterns []string) ([]*models.RBACPermission, error)
	ListMyPermissions(ctx context.Context, patterns []string) ([]*models.RBACPermission, error)
}

type ResolverRoot

type ResolverRoot interface {
	Mutation() MutationResolver
	Query() QueryResolver
}

Jump to

Keyboard shortcuts

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