tables

package
v0.0.0-...-fd63c1f Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func StreamAccountTable

func StreamAccountTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamBalanceTable

func StreamBalanceTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamBallotTable

func StreamBallotTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamBigmapAllocTable

func StreamBigmapAllocTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamBigmapUpdateTable

func StreamBigmapUpdateTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamBigmapValueTable

func StreamBigmapValueTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamBlockTable

func StreamBlockTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamChainTable

func StreamChainTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamConstantTable

func StreamConstantTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamContractTable

func StreamContractTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamElectionTable

func StreamElectionTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamEventTable

func StreamEventTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamFlowTable

func StreamFlowTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamIncomeTable

func StreamIncomeTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamOpTable

func StreamOpTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamProposalTable

func StreamProposalTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamRightsTable

func StreamRightsTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamSnapshotTable

func StreamSnapshotTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamSupplyTable

func StreamSupplyTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func StreamTable

func StreamTable(ctx *server.Context) (interface{}, int)

func StreamVoteTable

func StreamVoteTable(ctx *server.Context, args *TableRequest) (interface{}, int)

func UseLogger

func UseLogger(logger logpkg.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type Account

type Account struct {
	model.Account
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Account) MarshalCSV

func (a *Account) MarshalCSV() ([]string, error)

func (*Account) MarshalJSON

func (a *Account) MarshalJSON() ([]byte, error)

func (*Account) MarshalJSONBrief

func (a *Account) MarshalJSONBrief() ([]byte, error)

func (*Account) MarshalJSONVerbose

func (a *Account) MarshalJSONVerbose() ([]byte, error)

type Balance

type Balance struct {
	model.Balance
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Balance) MarshalCSV

func (b *Balance) MarshalCSV() ([]string, error)

func (*Balance) MarshalJSON

func (b *Balance) MarshalJSON() ([]byte, error)

func (*Balance) MarshalJSONBrief

func (b *Balance) MarshalJSONBrief() ([]byte, error)

func (*Balance) MarshalJSONVerbose

func (b *Balance) MarshalJSONVerbose() ([]byte, error)

type Ballot

type Ballot struct {
	model.Ballot
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Ballot) MarshalCSV

func (b *Ballot) MarshalCSV() ([]string, error)

func (*Ballot) MarshalJSON

func (b *Ballot) MarshalJSON() ([]byte, error)

func (*Ballot) MarshalJSONBrief

func (b *Ballot) MarshalJSONBrief() ([]byte, error)

func (*Ballot) MarshalJSONVerbose

func (b *Ballot) MarshalJSONVerbose() ([]byte, error)

type BigmapAllocItem

type BigmapAllocItem struct {
	model.BigmapAlloc
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*BigmapAllocItem) MarshalCSV

func (b *BigmapAllocItem) MarshalCSV() ([]string, error)

func (*BigmapAllocItem) MarshalJSON

func (b *BigmapAllocItem) MarshalJSON() ([]byte, error)

func (*BigmapAllocItem) MarshalJSONBrief

func (b *BigmapAllocItem) MarshalJSONBrief() ([]byte, error)

func (*BigmapAllocItem) MarshalJSONVerbose

func (b *BigmapAllocItem) MarshalJSONVerbose() ([]byte, error)

type BigmapUpdateItem

type BigmapUpdateItem struct {
	model.BigmapUpdate
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*BigmapUpdateItem) MarshalCSV

func (b *BigmapUpdateItem) MarshalCSV() ([]string, error)

func (*BigmapUpdateItem) MarshalJSON

func (b *BigmapUpdateItem) MarshalJSON() ([]byte, error)

func (*BigmapUpdateItem) MarshalJSONBrief

func (b *BigmapUpdateItem) MarshalJSONBrief() ([]byte, error)

func (*BigmapUpdateItem) MarshalJSONVerbose

func (b *BigmapUpdateItem) MarshalJSONVerbose() ([]byte, error)

type BigmapValueItem

type BigmapValueItem struct {
	model.BigmapValue
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*BigmapValueItem) MarshalCSV

func (b *BigmapValueItem) MarshalCSV() ([]string, error)

func (*BigmapValueItem) MarshalJSON

func (b *BigmapValueItem) MarshalJSON() ([]byte, error)

func (*BigmapValueItem) MarshalJSONBrief

func (b *BigmapValueItem) MarshalJSONBrief() ([]byte, error)

func (*BigmapValueItem) MarshalJSONVerbose

func (b *BigmapValueItem) MarshalJSONVerbose() ([]byte, error)

type Block

type Block struct {
	model.Block
	Predecessor tezos.BlockHash `pack:"predecessor" json:"predecessor"`
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Block) MarshalCSV

func (b *Block) MarshalCSV() ([]string, error)

func (*Block) MarshalJSON

func (b *Block) MarshalJSON() ([]byte, error)

func (*Block) MarshalJSONBrief

func (b *Block) MarshalJSONBrief() ([]byte, error)

func (*Block) MarshalJSONVerbose

func (b *Block) MarshalJSONVerbose() ([]byte, error)

type Chain

type Chain struct {
	model.Chain
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Chain) MarshalCSV

func (c *Chain) MarshalCSV() ([]string, error)

func (*Chain) MarshalJSON

func (c *Chain) MarshalJSON() ([]byte, error)

func (*Chain) MarshalJSONBrief

func (c *Chain) MarshalJSONBrief() ([]byte, error)

func (*Chain) MarshalJSONVerbose

func (c *Chain) MarshalJSONVerbose() ([]byte, error)

type Constant

type Constant struct {
	model.Constant
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Constant) MarshalCSV

func (c *Constant) MarshalCSV() ([]string, error)

func (*Constant) MarshalJSON

func (c *Constant) MarshalJSON() ([]byte, error)

func (*Constant) MarshalJSONBrief

func (c *Constant) MarshalJSONBrief() ([]byte, error)

func (*Constant) MarshalJSONVerbose

func (c *Constant) MarshalJSONVerbose() ([]byte, error)

type Contract

type Contract struct {
	model.Contract
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Contract) MarshalCSV

func (c *Contract) MarshalCSV() ([]string, error)

func (*Contract) MarshalJSON

func (c *Contract) MarshalJSON() ([]byte, error)

func (*Contract) MarshalJSONBrief

func (c *Contract) MarshalJSONBrief() ([]byte, error)

func (*Contract) MarshalJSONVerbose

func (c *Contract) MarshalJSONVerbose() ([]byte, error)

type Election

type Election struct {
	model.Election
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Election) MarshalCSV

func (e *Election) MarshalCSV() ([]string, error)

func (*Election) MarshalJSON

func (e *Election) MarshalJSON() ([]byte, error)

func (*Election) MarshalJSONBrief

func (e *Election) MarshalJSONBrief() ([]byte, error)

func (*Election) MarshalJSONVerbose

func (e *Election) MarshalJSONVerbose() ([]byte, error)

type Event

type Event struct {
	model.Event
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Event) MarshalCSV

func (e *Event) MarshalCSV() ([]string, error)

func (*Event) MarshalJSON

func (c *Event) MarshalJSON() ([]byte, error)

func (*Event) MarshalJSONBrief

func (e *Event) MarshalJSONBrief() ([]byte, error)

func (*Event) MarshalJSONVerbose

func (e *Event) MarshalJSONVerbose() ([]byte, error)

type Flow

type Flow struct {
	model.Flow
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Flow) MarshalCSV

func (f *Flow) MarshalCSV() ([]string, error)

func (*Flow) MarshalJSON

func (f *Flow) MarshalJSON() ([]byte, error)

func (*Flow) MarshalJSONBrief

func (f *Flow) MarshalJSONBrief() ([]byte, error)

func (*Flow) MarshalJSONVerbose

func (f *Flow) MarshalJSONVerbose() ([]byte, error)

type Income

type Income struct {
	model.Income
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Income) MarshalCSV

func (c *Income) MarshalCSV() ([]string, error)

func (*Income) MarshalJSON

func (r *Income) MarshalJSON() ([]byte, error)

func (*Income) MarshalJSONBrief

func (c *Income) MarshalJSONBrief() ([]byte, error)

func (*Income) MarshalJSONVerbose

func (c *Income) MarshalJSONVerbose() ([]byte, error)

type Op

type Op struct {
	model.Op
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Op) MarshalCSV

func (o *Op) MarshalCSV() ([]string, error)

func (*Op) MarshalJSON

func (o *Op) MarshalJSON() ([]byte, error)

func (*Op) MarshalJSONBrief

func (o *Op) MarshalJSONBrief() ([]byte, error)

func (*Op) MarshalJSONVerbose

func (o *Op) MarshalJSONVerbose() ([]byte, error)

type OpSorter

type OpSorter []*model.Op

func (OpSorter) Len

func (o OpSorter) Len() int

func (OpSorter) Less

func (o OpSorter) Less(i, j int) bool

func (OpSorter) Swap

func (o OpSorter) Swap(i, j int)

type Proposal

type Proposal struct {
	model.Proposal
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Proposal) MarshalCSV

func (p *Proposal) MarshalCSV() ([]string, error)

func (*Proposal) MarshalJSON

func (p *Proposal) MarshalJSON() ([]byte, error)

func (*Proposal) MarshalJSONBrief

func (p *Proposal) MarshalJSONBrief() ([]byte, error)

func (*Proposal) MarshalJSONVerbose

func (p *Proposal) MarshalJSONVerbose() ([]byte, error)
type Right struct {
	model.Right
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Right) MarshalCSV

func (r *Right) MarshalCSV() ([]string, error)

func (*Right) MarshalJSON

func (r *Right) MarshalJSON() ([]byte, error)

func (*Right) MarshalJSONBrief

func (r *Right) MarshalJSONBrief() ([]byte, error)

func (*Right) MarshalJSONVerbose

func (r *Right) MarshalJSONVerbose() ([]byte, error)

type Snapshot

type Snapshot struct {
	model.Snapshot
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Snapshot) MarshalCSV

func (s *Snapshot) MarshalCSV() ([]string, error)

func (*Snapshot) MarshalJSON

func (s *Snapshot) MarshalJSON() ([]byte, error)

func (*Snapshot) MarshalJSONBrief

func (s *Snapshot) MarshalJSONBrief() ([]byte, error)

func (*Snapshot) MarshalJSONVerbose

func (s *Snapshot) MarshalJSONVerbose() ([]byte, error)

type Supply

type Supply struct {
	model.Supply
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Supply) MarshalCSV

func (s *Supply) MarshalCSV() ([]string, error)

func (*Supply) MarshalJSON

func (s *Supply) MarshalJSON() ([]byte, error)

func (*Supply) MarshalJSONBrief

func (s *Supply) MarshalJSONBrief() ([]byte, error)

func (*Supply) MarshalJSONVerbose

func (s *Supply) MarshalJSONVerbose() ([]byte, error)

type TableRequest

type TableRequest struct {
	Table    string          `schema:"-"`
	Columns  util.StringList `schema:"columns"`
	Limit    uint            `schema:"limit"`
	Cursor   string          `schema:"cursor"`
	Format   string          `schema:"-"`     // from URL
	Order    pack.OrderType  `schema:"order"` // asc/desc
	Verbose  bool            `schema:"verbose"`
	Filename string          `schema:"filename"` // for CSV downloads

}

build packdb query from request

func (TableRequest) Expires

func (t TableRequest) Expires() time.Time

func (TableRequest) LastModified

func (t TableRequest) LastModified() time.Time

func (*TableRequest) Parse

func (t *TableRequest) Parse(ctx *server.Context)

func (TableRequest) RESTPath

func (t TableRequest) RESTPath(r *mux.Router) string

func (TableRequest) RESTPrefix

func (t TableRequest) RESTPrefix() string

func (TableRequest) RegisterDirectRoutes

func (t TableRequest) RegisterDirectRoutes(r *mux.Router) error

func (TableRequest) RegisterRoutes

func (t TableRequest) RegisterRoutes(r *mux.Router) error

type Vote

type Vote struct {
	model.Vote
	// contains filtered or unexported fields
}

configurable marshalling helper

func (*Vote) MarshalCSV

func (v *Vote) MarshalCSV() ([]string, error)

func (*Vote) MarshalJSON

func (v *Vote) MarshalJSON() ([]byte, error)

func (*Vote) MarshalJSONBrief

func (v *Vote) MarshalJSONBrief() ([]byte, error)

func (*Vote) MarshalJSONVerbose

func (v *Vote) MarshalJSONVerbose() ([]byte, error)

Jump to

Keyboard shortcuts

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