server

package
v0.0.0-...-1350c8b Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allowlist

type Allowlist shared.Allowlist

type App

type App struct {
	Router      *mux.Router
	DB          *shared.Database
	IpfsClient  *shared.IpfsClient
	FlowAdapter *shared.FlowAdapter

	TxOptionsAddresses []string
	Env                string
	AdminAllowlist     shared.Allowlist
	CommunityBlocklist shared.Allowlist
	Config             shared.Config
}

func (*App) ConnectDB

func (a *App) ConnectDB(username, password, host, port, dbname string)

func (*App) Initialize

func (a *App) Initialize()

func (*App) Run

func (a *App) Run()

type Balance

type Balance models.Balance

type Community

type Community models.Community

type CommunityUser

type CommunityUser models.CommunityUser

type CommunityUserPayload

type CommunityUserPayload models.CommunityUserPayload

type Database

type Database shared.Database

type Helpers

type Helpers struct {
	A *App
}

func (*Helpers) Initialize

func (h *Helpers) Initialize(app *App)

type IpfsClient

type IpfsClient shared.IpfsClient

type List

type List models.List

type ListRequest

type ListRequest models.ListPayload

type ListUpdatePayload

type ListUpdatePayload models.ListUpdatePayload

type Proposal

type Proposal models.Proposal

type Strategy

type Strategy interface {
	TallyVotes(votes []*models.VoteWithBalance, p *models.ProposalResults, proposal *models.Proposal) (models.ProposalResults, error)
	GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error)
	GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error)
	InitStrategy(f *shared.FlowAdapter, db *shared.Database)
	FetchBalance(b *models.Balance, p *models.Proposal) (*models.Balance, error)
	RequiresSnapshot() bool
}

type TxOptionsAddresses

type TxOptionsAddresses []string

type UserCommunity

type UserCommunity models.UserCommunity

type Vote

type Vote models.Vote

Jump to

Keyboard shortcuts

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