connectors

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountConnection

AccountConnection implements collection accessor interface with pagination

func NewAccountConnection

func NewAccountConnection(ctx context.Context, accountsAccessor account.Usecase, filter *gqlmodels.AccountListFilter, order *gqlmodels.AccountListOrder, page *gqlmodels.Page) *AccountConnection

NewAccountConnection based on query object

type AuthClientConnection

AuthClientConnection implements collection accessor interface with pagination

func NewAuthClientConnection

func NewAuthClientConnection(ctx context.Context, authClientsAccessor authclient.Usecase, page *gqlmodels.Page) *AuthClientConnection

NewAuthClientConnection based on query object

type CollectionConnection

type CollectionConnection[GQLM any, EdgeT any] struct {
	// contains filtered or unexported fields
}

CollectionConnection implements collection accessor interface with pagination

func NewCollectionConnection

func NewCollectionConnection[GQLM any, EdgeT any](ctx context.Context, dataAccessor DataAccessor[GQLM, EdgeT], page *gqlmodels.Page) *CollectionConnection[GQLM, EdgeT]

NewCollectionConnection based on query object

func (*CollectionConnection[GQLM, EdgeT]) Edges

func (c *CollectionConnection[GQLM, EdgeT]) Edges() []*EdgeT

The edges for each of the campaigs's lists

func (*CollectionConnection[GQLM, EdgeT]) List

func (c *CollectionConnection[GQLM, EdgeT]) List() []*GQLM

List returns list of the accounts, as a convenience when edges are not needed.

func (*CollectionConnection[GQLM, EdgeT]) PageInfo

func (c *CollectionConnection[GQLM, EdgeT]) PageInfo() *gqlmodels.PageInfo

PageInfo returns information about pages

func (*CollectionConnection[GQLM, EdgeT]) TotalCount

func (c *CollectionConnection[GQLM, EdgeT]) TotalCount() int

TotalCount returns number of campaigns

type DataAccessor

type DataAccessor[M any, EdgeT any] interface {
	FetchDataList(ctx context.Context) ([]*M, error)
	CountData(ctx context.Context) (int64, error)
	ConvertToEdge(obj *M) *EdgeT
}

DataAccessor is a generic interface for data accessors

type DataAccessorFunc

type DataAccessorFunc[M any, EdgeT any] struct {
	FetchDataListFunc func(ctx context.Context) ([]*M, error)
	CountDataFunc     func(ctx context.Context) (int64, error)
	ConvertToEdgeFunc func(obj *M) *EdgeT
}

DataAccessorFunc provides a generic implementation of DataAccessor as a function

func (*DataAccessorFunc[M, EdgeT]) ConvertToEdge

func (d *DataAccessorFunc[M, EdgeT]) ConvertToEdge(obj *M) *EdgeT

func (*DataAccessorFunc[M, EdgeT]) CountData

func (d *DataAccessorFunc[M, EdgeT]) CountData(ctx context.Context) (int64, error)

func (*DataAccessorFunc[M, EdgeT]) FetchDataList

func (d *DataAccessorFunc[M, EdgeT]) FetchDataList(ctx context.Context) ([]*M, error)

type DirectAccessTokenConnection

DirectAccessTokenConnection implements collection accessor interface with pagination

func NewDirectAccessTokenConnection

NewDirectAccessTokenConnection based on query object

type HistoryActionConnection

HistoryActionConnection implements collection accessor interface with pagination

func NewHistoryActionConnection

func NewHistoryActionConnection(ctx context.Context, historyActionsAccessor historylog.Usecase, filter *gqlmodels.HistoryActionListFilter, order *gqlmodels.HistoryActionListOrder, page *gqlmodels.Page) *HistoryActionConnection

NewHistoryActionConnection based on query object

type MemberConnection

MemberConnection implements collection accessor interface with pagination

func NewMemberConnection

func NewMemberConnection(ctx context.Context, accountsAccessor account.Usecase, filter *gqlmodels.MemberListFilter, order *gqlmodels.MemberListOrder, page *gqlmodels.Page) *MemberConnection

NewMemberConnection based on query object

type OptionConnection

OptionConnection implements collection accessor interface with pagination

func NewOptionConnection

func NewOptionConnection(ctx context.Context, optionsAccessor option.Usecase, filter *gqlmodels.OptionListFilter, order *gqlmodels.OptionListOrder, page *gqlmodels.Page) *OptionConnection

NewOptionConnection based on query object

type RBACRoleConnection

RBACRoleConnection implements collection accessor interface with pagination

func NewRBACRoleConnection

func NewRBACRoleConnection(ctx context.Context, rolesAccessor rbac.Usecase, filter *gqlmodels.RBACRoleListFilter, order *gqlmodels.RBACRoleListOrder, page *gqlmodels.Page) *RBACRoleConnection

NewRBACRoleConnection based on query object

func NewRBACRoleConnectionByIDs

func NewRBACRoleConnectionByIDs(ctx context.Context, rolesPepo rbac.Repository, ids []uint64, order *gqlmodels.RBACRoleListOrder) *RBACRoleConnection

NewRBACRoleConnectionByIDs based on query object

type SocialAccountConnection

SocialAccountConnection implements collection accessor interface with pagination

func NewSocialAccountConnection

func NewSocialAccountConnection(ctx context.Context, accountsAccessor socialaccount.Usecase, filter *gqlmodels.SocialAccountListFilter, order *gqlmodels.SocialAccountListOrder, page *gqlmodels.Page) *SocialAccountConnection

NewSocialAccountConnection based on query object

type UserConnection

UserConnection implements collection accessor interface with pagination

func NewUserConnection

func NewUserConnection(ctx context.Context, usersAccessor user.Usecase, filter *gqlmodels.UserListFilter, order *gqlmodels.UserListOrder, page *gqlmodels.Page) *UserConnection

NewUserConnection based on query object

Jump to

Keyboard shortcuts

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