resolvers

package
v0.0.0-...-4c8f420 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package resolvers implements GraphQL resolvers to incoming API requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetConfig

func SetConfig(c *config.Config)

SetConfig sets the repository configuration to be used to establish and maintain external repository connections.

func SetLogger

func SetLogger(l logger.AppLogger)

SetLogger sets the repository logger to be used to collect logging info.

Types

type Project

type Project struct {
	Id                graphql.Long  `db:"id"`
	ProjectId         graphql.Long  `db:"project_id"`
	OwnerAddress      types.Address `db:"owner_address"`
	ReceiverAddress   types.Address `db:"receiver_address"`
	CollectedRewards  graphql.Long  `db:"collected_rewards"`
	ClaimedRewards    graphql.Long  `db:"claimed_rewards"`
	RewardsToClaim    graphql.Long  `db:"rewards_to_claim"`
	Name              string        `db:"name"`
	Url               string        `db:"url"`
	ImageUrl          string        `db:"image_url"`
	TransactionsCount graphql.Long  `db:"transactions_count"`
}

func (Project) Contracts

func (pr Project) Contracts() (out []ProjectContract, err error)

type ProjectContract

type ProjectContract struct {
	Id        graphql.Long  `db:"id"`
	ProjectId graphql.Long  `db:"project_id"`
	Address   types.Address `db:"address"`
	Approved  bool          `db:"is_approved"`
}

type RootResolver

type RootResolver struct{}

func Resolver

func Resolver() *RootResolver

Resolver returns a singleton resolver fo the root resolver.

func (*RootResolver) Contracts

func (rs *RootResolver) Contracts() (out []ProjectContract, err error)

Contracts provides list of contracts

func (*RootResolver) GasMonetizationAddress

func (rs *RootResolver) GasMonetizationAddress() common.Address

GasMonetizationAddress returns the address of the gas monetization contract.

func (*RootResolver) Projects

func (rs *RootResolver) Projects() (out []Project, err error)

Projects provides list of projects

func (*RootResolver) TotalAmountClaimed

func (rs *RootResolver) TotalAmountClaimed() (out graphql.Long, err error)

TotalAmountClaimed provides total amount claimed tokens

func (*RootResolver) TotalAmountCollected

func (rs *RootResolver) TotalAmountCollected() (out graphql.Long, err error)

TotalAmountCollected provides total amount collected tokens

func (*RootResolver) TotalTransactionCount

func (rs *RootResolver) TotalTransactionCount() (out graphql.Long, err error)

TotalTransactionCount provides total amount collected tokens

Jump to

Keyboard shortcuts

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