examples

package module
v0.0.0-...-ae266df Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

func StartGraphQL

func StartGraphQL()

Types

type Loaders

type Loaders struct {
	UserDataLoader        *UserDataLoader
	UserFriendsDataLoader *UserFriendsDataLoader
}

type Services

type Services struct {
	UserService *UserService
}

type User

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type UserBatchLoader

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

func (*UserBatchLoader) BatchLoad

func (c *UserBatchLoader) BatchLoad(ctx context.Context, keys *[]string) (map[string]*User, error)

type UserDataLoader

type UserDataLoader = dl.DataLoader[string, User]

func NewUserDataLoader

func NewUserDataLoader(ctx context.Context) *UserDataLoader

type UserFriendsBatchLoader

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

func (*UserFriendsBatchLoader) BatchLoad

func (c *UserFriendsBatchLoader) BatchLoad(ctx context.Context, keys *[]string) (map[string]*[]string, error)

type UserFriendsDataLoader

type UserFriendsDataLoader = dl.DataLoader[string, []string]

func NewUserFriendsDataLoader

func NewUserFriendsDataLoader(ctx context.Context) *UserFriendsDataLoader

type UserFriendsService

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

func NewUserFriendsService

func NewUserFriendsService() *UserFriendsService

func (*UserFriendsService) GetUserFriendsMap

func (s *UserFriendsService) GetUserFriendsMap(ctx context.Context, user_ids *[]string) (map[string]*[]string, error)

type UserService

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

func NewUserService

func NewUserService() *UserService

func (*UserService) GetAllUsers

func (s *UserService) GetAllUsers(ctx context.Context) ([]*User, error)

func (*UserService) GetUsersMap

func (s *UserService) GetUsersMap(ctx context.Context, ids *[]string) (map[string]*User, error)

type UserView

type UserView struct {
	User
	Friends []*User `json:"friends"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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