graphql

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAccountIDRequired = errors.New("account id is required")
)

Functions

This section is empty.

Types

type AuthResolver

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

AuthResolver is the resolver for the Auth type

func NewAuthResolver

func NewAuthResolver(provider *jwt.Provider, roleRepo rbac.Repository) *AuthResolver

NewAuthResolver creates new resolver for the Auth type

func (*AuthResolver) CurrentSession

func (r *AuthResolver) CurrentSession(ctx context.Context) (*models.SessionToken, error)

CurrentSession is the resolver for the currentSession field

func (*AuthResolver) ListRolesAndPermissions

func (r *AuthResolver) ListRolesAndPermissions(ctx context.Context, accountID uint64, order *models.RBACRoleListOrder) (*connectors.RBACRoleConnection, error)

ListRolesAndPermissions is the resolver for the listRolesAndPermissions field

func (*AuthResolver) Login

func (r *AuthResolver) Login(ctx context.Context, login string, password string) (*models.SessionToken, error)

Login is the resolver for the login field

func (*AuthResolver) Logout

func (r *AuthResolver) Logout(ctx context.Context) (bool, error)

Logout is the resolver for the logout field

func (*AuthResolver) SwitchAccount

func (r *AuthResolver) SwitchAccount(ctx context.Context, id uint64) (*models.SessionToken, error)

SwitchAccount is the resolver for the switchAccount field

type MemberQueryResolver

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

func NewMemberQueryResolver

func NewMemberQueryResolver() *MemberQueryResolver

func (*MemberQueryResolver) Approve

func (r *MemberQueryResolver) Approve(ctx context.Context, memberID uint64, msg string) (*models.MemberPayload, error)

ApproveAccountMember is the resolver for the approveAccountMember field.

func (*MemberQueryResolver) Invite

Invite is the resolver for the inviteAccountMember field.

func (*MemberQueryResolver) List

List is the resolver for the listMembers field.

func (*MemberQueryResolver) Reject

func (r *MemberQueryResolver) Reject(ctx context.Context, memberID uint64, msg string) (*models.MemberPayload, error)

Reject is the resolver for the rejectAccountMember field.

func (*MemberQueryResolver) Remove

func (r *MemberQueryResolver) Remove(ctx context.Context, memberID uint64) (*models.MemberPayload, error)

Remove is the resolver for the removeAccountMember field.

func (*MemberQueryResolver) Update

func (r *MemberQueryResolver) Update(ctx context.Context, memberID uint64, member models.MemberInput) (*models.MemberPayload, error)

Update is the resolver for the updateAccountMember field.

type QueryResolver

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

QueryResolver implements GQL API methods

func NewQueryResolver

func NewQueryResolver() *QueryResolver

NewQueryResolver returns new API resolver

func (*QueryResolver) Account

Account returns the account info

func (*QueryResolver) ApproveAccount

func (r *QueryResolver) ApproveAccount(ctx context.Context, id uint64, msg string) (*gqlmodels.AccountPayload, error)

ApproveAccount is the resolver for the approveAccount field.

func (*QueryResolver) CurrentAccount

func (r *QueryResolver) CurrentAccount(ctx context.Context) (*gqlmodels.AccountPayload, error)

CurrentAccount returns the current account info

func (*QueryResolver) ListAccounts

ListAccounts list by filter

func (*QueryResolver) RegisterAccount

RegisterAccount creates a new account

func (*QueryResolver) RejectAccount

func (r *QueryResolver) RejectAccount(ctx context.Context, id uint64, msg string) (*gqlmodels.AccountPayload, error)

RejectAccount is the resolver for the rejectAccount field.

func (*QueryResolver) UpdateAccount

func (r *QueryResolver) UpdateAccount(ctx context.Context, id uint64, input *gqlmodels.AccountInput) (*gqlmodels.AccountPayload, error)

UpdateAccount is the resolver for the updateAccount field.

Jump to

Keyboard shortcuts

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