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 ClientResolver ¶
type CompanyResolver ¶
type CompanyResolver interface { Users(ctx context.Context, obj *model.Company) ([]*model.User, error) Domains(ctx context.Context, obj *model.Company) ([]string, error) BillingAddress(ctx context.Context, obj *model.Company) (*model.Address, error) ShippingAddress(ctx context.Context, obj *model.Company) (*model.Address, error) }
type ComplexityRoot ¶
type ComplexityRoot struct { Address struct { City func(childComplexity int) int Country func(childComplexity int) int Name func(childComplexity int) int PostalCode func(childComplexity int) int State func(childComplexity int) int Street1 func(childComplexity int) int Street2 func(childComplexity int) int } AuthData struct { Token func(childComplexity int) int TwoFactorEnabled func(childComplexity int) int User func(childComplexity int) int } Client struct { BillingAddress func(childComplexity int) int BusinessNumber func(childComplexity int) int Contacts func(childComplexity int) int CreatedAt func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int Phone func(childComplexity int) int ShippingAddress func(childComplexity int) int VatNumber func(childComplexity int) int Website func(childComplexity int) int } Company struct { BillingAddress func(childComplexity int) int Code func(childComplexity int) int CreatedAt func(childComplexity int) int Domains func(childComplexity int) int ID func(childComplexity int) int Name func(childComplexity int) int ShippingAddress func(childComplexity int) int Users func(childComplexity int) int Website func(childComplexity int) int } Contact struct { 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 Mobile func(childComplexity int) int Phone func(childComplexity int) int PreferredContact func(childComplexity int) int } Entity struct { FindClientByID func(childComplexity int, id hide.ID) int FindCompanyByID func(childComplexity int, id hide.ID) int FindUserByID func(childComplexity int, id hide.ID) int } Mutation struct { ChangePassword func(childComplexity int, oldPassword string, newPassword string) int CreateClient func(childComplexity int, client modelgen.CreateClientInput) int CreateCompany func(childComplexity int, company modelgen.CreateCompanyInput) int CreateUser func(childComplexity int, email string, password string) int CreateUserForCompany func(childComplexity int, companyID hide.ID, email string, password string) int DeleteClient func(childComplexity int, id hide.ID) int DeleteCompany func(childComplexity int, id hide.ID) int DeleteUser func(childComplexity int, id hide.ID) int DeleteUserForCompany func(childComplexity int, companyID hide.ID, id hide.ID) int DeleteUsers func(childComplexity int, ids []hide.ID) int DeleteUsersForCompany func(childComplexity int, companyID hide.ID, ids []hide.ID) int DisableTwoFactor func(childComplexity int, password string) int EnableTwoFactor func(childComplexity int, secret string, token string) int Login func(childComplexity int, email string, password string, twoFactor *string) int LoginSecure func(childComplexity int, password string) int NewTwoFactorBackups func(childComplexity int) int RefreshToken func(childComplexity int) int UpdateClient func(childComplexity int, id hide.ID, client modelgen.UpdateClientInput) int } Permission struct { Operation func(childComplexity int) int Subject func(childComplexity int) int } Query struct { Client func(childComplexity int, id hide.ID) int ClientCount func(childComplexity int) int Clients func(childComplexity int, page *int) int Companies func(childComplexity int, page *int) int Company func(childComplexity int) int CompanyName func(childComplexity int, code string) int Me func(childComplexity int) int OtherCompany func(childComplexity int, id hide.ID) int Scopes func(childComplexity int) int SearchUsers func(childComplexity int, search string, page *int) int SearchUsersForCompany func(childComplexity int, companyID hide.ID, search string, page *int) int TwoFactorBackups func(childComplexity int) int TwoFactorEnabled func(childComplexity int) int User func(childComplexity int, id hide.ID) int UserForCompany func(childComplexity int, companyID hide.ID, id hide.ID) int Users func(childComplexity int, page *int) int UsersForCompany func(childComplexity int, companyID hide.ID, page *int) int Version func(childComplexity int) int // contains filtered or unexported fields } User struct { Company 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 Mobile func(childComplexity int) int Phone func(childComplexity int) int PreferredContact func(childComplexity int) int } Service struct { SDL func(childComplexity int) int } }
type Config ¶
type Config struct { Resolvers ResolverRoot Directives DirectiveRoot Complexity ComplexityRoot }
type DirectiveRoot ¶
type DirectiveRoot struct { HasPerm func(ctx context.Context, obj interface{}, next graphql.Resolver, perm string) (res interface{}, err error) HasPerms func(ctx context.Context, obj interface{}, next graphql.Resolver, perms []string) (res interface{}, err error) IsAuthenticated func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) IsSecureAuthenticated func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) }
type EntityResolver ¶
type MutationResolver ¶
type MutationResolver interface { Login(ctx context.Context, email string, password string, twoFactor *string) (*model.AuthData, error) LoginSecure(ctx context.Context, password string) (string, error) RefreshToken(ctx context.Context) (string, error) ChangePassword(ctx context.Context, oldPassword string, newPassword string) (bool, error) NewTwoFactorBackups(ctx context.Context) ([]string, error) EnableTwoFactor(ctx context.Context, secret string, token string) ([]string, error) DisableTwoFactor(ctx context.Context, password string) (bool, error) CreateClient(ctx context.Context, client modelgen.CreateClientInput) (*model.Client, error) UpdateClient(ctx context.Context, id hide.ID, client modelgen.UpdateClientInput) (*model.Client, error) DeleteClient(ctx context.Context, id hide.ID) (*bool, error) CreateCompany(ctx context.Context, company modelgen.CreateCompanyInput) (*model.Company, error) DeleteCompany(ctx context.Context, id hide.ID) (*bool, error) CreateUser(ctx context.Context, email string, password string) (*model.User, error) CreateUserForCompany(ctx context.Context, companyID hide.ID, email string, password string) (*model.User, error) DeleteUser(ctx context.Context, id hide.ID) (*bool, error) DeleteUserForCompany(ctx context.Context, companyID hide.ID, id hide.ID) (*bool, error) DeleteUsers(ctx context.Context, ids []hide.ID) ([]bool, error) DeleteUsersForCompany(ctx context.Context, companyID hide.ID, ids []hide.ID) ([]bool, error) }
type PermissionResolver ¶
type PermissionResolver interface { Subject(ctx context.Context, obj *permission.Permission) (string, error) Operation(ctx context.Context, obj *permission.Permission) (string, error) }
type QueryResolver ¶
type QueryResolver interface { TwoFactorBackups(ctx context.Context) ([]string, error) TwoFactorEnabled(ctx context.Context) (bool, error) Scopes(ctx context.Context) ([]*permission.Permission, error) Client(ctx context.Context, id hide.ID) (*model.Client, error) ClientCount(ctx context.Context) (int, error) Clients(ctx context.Context, page *int) ([]*model.Client, error) CompanyName(ctx context.Context, code string) (*string, error) Company(ctx context.Context) (*model.Company, error) OtherCompany(ctx context.Context, id hide.ID) (*model.Company, error) Companies(ctx context.Context, page *int) ([]*model.Company, error) Version(ctx context.Context) (string, error) Me(ctx context.Context) (*model.User, error) User(ctx context.Context, id hide.ID) (*model.User, error) UserForCompany(ctx context.Context, companyID hide.ID, id hide.ID) (*model.User, error) Users(ctx context.Context, page *int) ([]*model.User, error) UsersForCompany(ctx context.Context, companyID hide.ID, page *int) ([]*model.User, error) SearchUsers(ctx context.Context, search string, page *int) ([]*model.User, error) SearchUsersForCompany(ctx context.Context, companyID hide.ID, search string, page *int) ([]*model.User, error) }
type ResolverRoot ¶
type ResolverRoot interface { Client() ClientResolver Company() CompanyResolver Entity() EntityResolver Mutation() MutationResolver Permission() PermissionResolver Query() QueryResolver User() UserResolver }
Click to show internal directories.
Click to hide internal directories.