common

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category string

type Content

type Content struct {
	Type ContentType `json:"type"`
	Body string      `json:"body"`
}

type ContentType

type ContentType string
const (
	Markdown ContentType = "markdown"
	HTML     ContentType = "html"
)

type ERC20BalanceOfStrategyParams

type ERC20BalanceOfStrategyParams struct {
	StrategyParams

	Symbol   string `json:"symbol"`
	Address  string `json:"address"`
	Decimals int    `json:"decimals"`
}

type Network

type Network string
const (
	EthereumNetwork Network = "1"
)

type Strategy

type Strategy struct {
	Name    string                `json:"name"`
	Network Network               `json:"network"`
	Params  UnknownStrategyParams `json:"params"` // TODO
}

type StrategyParams

type StrategyParams interface {
	IsStrategyParams()
}

type Time

type Time struct {
	*time.Time
}

func NewTime

func NewTime(t time.Time) *Time

func (*Time) AsTime

func (t *Time) AsTime() *time.Time

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

type Treasury

type Treasury struct {
	Name    string  `json:"name"`
	Address string  `json:"address"`
	Network Network `json:"network"`
}

type UnknownStrategyParams

type UnknownStrategyParams map[string]interface{}

func (UnknownStrategyParams) IsStrategyParams

func (a UnknownStrategyParams) IsStrategyParams()

type User

type User struct {
	Address      UserAddress `json:"address"`
	ResolvedName *string     `json:"resolved_name"`
	Avatars      UserAvatars `json:"avatars"`
}

type UserAddress

type UserAddress string

type UserAvatar

type UserAvatar struct {
	Size string `json:"size"`
	Link string `json:"link"`
}

type UserAvatars

type UserAvatars []UserAvatar

func GenerateDAOAvatars

func GenerateDAOAvatars(address string) UserAvatars

func GenerateProfileAvatars

func GenerateProfileAvatars(address string) UserAvatars

type Validation

type Validation struct {
	Name   string      `json:"name"`
	Params interface{} `json:"params"`
}

Jump to

Keyboard shortcuts

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