connectors

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 3

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

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]) DecodableCacheValue added in v0.3.6

func (c *CollectionConnection[GQLM, EdgeT]) DecodableCacheValue(data []byte) error

DecodableCacheValue decodes the byte slice from cache back into the collection connection

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]) EncodableCacheValue added in v0.3.6

func (c *CollectionConnection[GQLM, EdgeT]) EncodableCacheValue() ([]byte, error)

EncodableCacheValue encodes the collection connection to a byte slice for caching

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 HistoryActionConnection

HistoryActionConnection implements collection accessor interface with pagination

type MemberConnection

MemberConnection implements collection accessor interface with pagination

type OptionConnection

OptionConnection implements collection accessor interface with pagination

type RBACRoleConnection

RBACRoleConnection implements collection accessor interface with pagination

type SocialAccountConnection

SocialAccountConnection implements collection accessor interface with pagination

type UserConnection

UserConnection implements collection accessor interface with pagination

Jump to

Keyboard shortcuts

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