Documentation
¶
Index ¶
- type AccountConnection
- type CollectionConnection
- func (c *CollectionConnection[GQLM, EdgeT]) DecodableCacheValue(data []byte) error
- func (c *CollectionConnection[GQLM, EdgeT]) Edges() []*EdgeT
- func (c *CollectionConnection[GQLM, EdgeT]) EncodableCacheValue() ([]byte, error)
- func (c *CollectionConnection[GQLM, EdgeT]) List() []*GQLM
- func (c *CollectionConnection[GQLM, EdgeT]) PageInfo() *gqlmodels.PageInfo
- func (c *CollectionConnection[GQLM, EdgeT]) TotalCount() int
- type DataAccessor
- type DataAccessorFunc
- type HistoryActionConnection
- type MemberConnection
- type OptionConnection
- type RBACRoleConnection
- type SocialAccountConnection
- type UserConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountConnection ¶
type AccountConnection = CollectionConnection[gqlmodels.Account, gqlmodels.AccountEdge]
AccountConnection implements collection accessor interface with pagination
type CollectionConnection ¶
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 ¶
type HistoryActionConnection = CollectionConnection[gqlmodels.HistoryAction, gqlmodels.HistoryActionEdge]
HistoryActionConnection implements collection accessor interface with pagination
type MemberConnection ¶
type MemberConnection = CollectionConnection[gqlmodels.Member, gqlmodels.MemberEdge]
MemberConnection implements collection accessor interface with pagination
type OptionConnection ¶
type OptionConnection = CollectionConnection[gqlmodels.Option, gqlmodels.OptionEdge]
OptionConnection implements collection accessor interface with pagination
type RBACRoleConnection ¶
type RBACRoleConnection = CollectionConnection[gqlmodels.RBACRole, gqlmodels.RBACRoleEdge]
RBACRoleConnection implements collection accessor interface with pagination
type SocialAccountConnection ¶
type SocialAccountConnection = CollectionConnection[gqlmodels.SocialAccount, gqlmodels.SocialAccountEdge]
SocialAccountConnection implements collection accessor interface with pagination
type UserConnection ¶
type UserConnection = CollectionConnection[gqlmodels.User, gqlmodels.UserEdge]
UserConnection implements collection accessor interface with pagination