loader

package
v0.0.0-...-81dc835 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AppLoader

type AppLoader struct {
	*graphqlutil.DataLoader `wire:"-"`
	AppService              AppLoaderAppService
	Authz                   AuthzService
}

func NewAppLoader

func NewAppLoader(appService AppLoaderAppService, authz AuthzService) *AppLoader

func (*AppLoader) LoadFunc

func (l *AppLoader) LoadFunc(ctx context.Context, keys []interface{}) ([]interface{}, error)

type AppLoaderAppService

type AppLoaderAppService interface {
	GetMany(ctx context.Context, ids []string) ([]*model.App, error)
}

type AuthzService

type AuthzService interface {
	CheckAccessOfViewer(ctx context.Context, appID string) (userID string, err error)
}

type CollaboratorInvitationLoader

type CollaboratorInvitationLoader struct {
	*graphqlutil.DataLoader `wire:"-"`
	CollaboratorService     CollaboratorLoaderCollaboratorService
	Authz                   AuthzService
}

func NewCollaboratorInvitationLoader

func NewCollaboratorInvitationLoader(
	collaboratorService CollaboratorLoaderCollaboratorService,
	authz AuthzService,
) *CollaboratorInvitationLoader

func (*CollaboratorInvitationLoader) LoadFunc

func (l *CollaboratorInvitationLoader) LoadFunc(ctx context.Context, keys []interface{}) ([]interface{}, error)

type CollaboratorLoader

type CollaboratorLoader struct {
	*graphqlutil.DataLoader `wire:"-"`
	CollaboratorService     CollaboratorLoaderCollaboratorService
	Authz                   AuthzService
}

func NewCollaboratorLoader

func NewCollaboratorLoader(
	collaboratorService CollaboratorLoaderCollaboratorService,
	authz AuthzService,
) *CollaboratorLoader

func (*CollaboratorLoader) LoadFunc

func (l *CollaboratorLoader) LoadFunc(ctx context.Context, keys []interface{}) ([]interface{}, error)

type CollaboratorLoaderCollaboratorService

type CollaboratorLoaderCollaboratorService interface {
	GetManyCollaborators(ctx context.Context, ids []string) ([]*model.Collaborator, error)
	GetManyInvitations(ctx context.Context, ids []string) ([]*model.CollaboratorInvitation, error)
}

type DomainLoader

type DomainLoader struct {
	*graphqlutil.DataLoader `wire:"-"`
	DomainService           DomainLoaderDomainService
	Authz                   AuthzService
}

func NewDomainLoader

func NewDomainLoader(domainService DomainLoaderDomainService, authz AuthzService) *DomainLoader

func (*DomainLoader) LoadFunc

func (l *DomainLoader) LoadFunc(ctx context.Context, keys []interface{}) ([]interface{}, error)

type DomainLoaderDomainService

type DomainLoaderDomainService interface {
	GetMany(ctx context.Context, ids []string) ([]*apimodel.Domain, error)
}

type HTTPClient

type HTTPClient struct {
	*http.Client
}

func NewHTTPClient

func NewHTTPClient() HTTPClient

type UserLoader

type UserLoader struct {
	*graphqlutil.DataLoader `wire:"-"`

	AdminAPI      UserLoaderAdminAPIService
	Apps          UserLoaderAppService
	Collaborators UserLoaderCollaboratorService
	HTTPClient    HTTPClient
}

func NewUserLoader

func NewUserLoader(adminAPI UserLoaderAdminAPIService, apps UserLoaderAppService, collaborators UserLoaderCollaboratorService, httpClient HTTPClient) *UserLoader

func (*UserLoader) LoadFunc

func (l *UserLoader) LoadFunc(ctx context.Context, keys []interface{}) ([]interface{}, error)

type UserLoaderAdminAPIService

type UserLoaderAdminAPIService interface {
	SelfDirector(ctx context.Context, actorUserID string, usage service.Usage) (func(*http.Request), error)
}

type UserLoaderAppService

type UserLoaderAppService interface {
	GetManyProjectQuota(ctx context.Context, userIDs []string) ([]int, error)
}

type UserLoaderCollaboratorService

type UserLoaderCollaboratorService interface {
	GetManyProjectOwnerCount(ctx context.Context, userIDs []string) ([]int, error)
}

Jump to

Keyboard shortcuts

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