types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 14 Imported by: 7

Documentation

Index

Constants

View Source
const (

	// DecimalStr is a fixed point number.
	DecimalStr = "decimal"
)

Variables

View Source
var (
	IntType = &DataType{
		Name: intStr,
	}
	TextType = &DataType{
		Name: textStr,
	}
	BoolType = &DataType{
		Name: boolStr,
	}
	BlobType = &DataType{
		Name: blobStr,
	}
	UUIDType = &DataType{
		Name: uuidStr,
	}
	Uint256Type = &DataType{
		Name: uint256Str,
	}
	// NullType is a special type used internally
	NullType = &DataType{
		Name: nullStr,
	}
	// Unknown is a special type used internally
	// when a type is unknown until runtime.
	UnknownType = &DataType{
		Name: unknownStr,
	}
)

declared DataType constants. We do not have one for fixed because fixed types require metadata.

View Source
var ZeroMetadata = [2]uint16{}

Functions

This section is empty.

Types

type Account

type Account struct {
	Identifier HexBytes `json:"identifier"`
	Balance    *big.Int `json:"balance"`
	Nonce      int64    `json:"nonce"`
}

type AccountStatus

type AccountStatus uint32
const (
	AccountStatusLatest AccountStatus = iota
	AccountStatusPending
)

type Action added in v0.2.0

type Action struct {
	Name        string     `json:"name"`
	Annotations []string   `json:"annotations"`
	Parameters  []string   `json:"parameters"`
	Public      bool       `json:"public"`
	Modifiers   []Modifier `json:"modifiers"`
	Body        string     `json:"body"`
}

Action is a procedure in a database schema. These are defined by Kuneiform's `action` keyword.

func (*Action) Clean added in v0.2.0

func (p *Action) Clean() error

Clean validates rules about the data in the struct (naming conventions, syntax, etc.).

func (*Action) IsOwnerOnly added in v0.2.0

func (p *Action) IsOwnerOnly() bool

IsOwnerOnly returns true if the procedure has an owner modifier.

func (*Action) IsView added in v0.2.0

func (p *Action) IsView() bool

IsView returns true if the procedure has a view modifier.

type Attribute added in v0.2.0

type Attribute struct {
	Type  AttributeType `json:"type"`
	Value string        `json:"value"`
}

Attribute is a column attribute. These are constraints and default values.

func (*Attribute) Clean added in v0.2.0

func (a *Attribute) Clean(col *Column) error

Clean validates rules about the data in the struct (naming conventions, syntax, etc.).

func (*Attribute) Copy added in v0.2.0

func (a *Attribute) Copy() *Attribute

Copy returns a copy of the attribute

type AttributeType added in v0.2.0

type AttributeType string

AttributeType is a type of attribute (e.g. PRIMARY_KEY, UNIQUE, NOT_NULL, DEFAULT, MIN, MAX, MIN_LENGTH, MAX_LENGTH)

const (
	PRIMARY_KEY AttributeType = "PRIMARY_KEY"
	UNIQUE      AttributeType = "UNIQUE"
	NOT_NULL    AttributeType = "NOT_NULL"
	DEFAULT     AttributeType = "DEFAULT"
	MIN         AttributeType = "MIN"
	MAX         AttributeType = "MAX"
	MIN_LENGTH  AttributeType = "MIN_LENGTH"
	MAX_LENGTH  AttributeType = "MAX_LENGTH" // is this kwil custom?
)

Attribute Types

func (*AttributeType) Clean added in v0.2.0

func (a *AttributeType) Clean() error

Clean validates rules about the data in the struct (naming conventions, syntax, etc.).

func (*AttributeType) IsValid added in v0.2.0

func (a *AttributeType) IsValid() bool

func (AttributeType) String added in v0.2.0

func (a AttributeType) String() string

type ChainInfo

type ChainInfo struct {
	ChainID     string `json:"chain_id"`
	BlockHeight uint64 `json:"block_height"`
	BlockHash   string `json:"block_hash"`
}

ChainInfo describes the current status of a Kwil blockchain.

type Column added in v0.2.0

type Column struct {
	Name       string       `json:"name"`
	Type       *DataType    `json:"type"`
	Attributes []*Attribute `json:"attributes"`
}

Column is a column in a table.

func (*Column) Clean added in v0.2.0

func (c *Column) Clean() error

func (*Column) Copy added in v0.2.0

func (c *Column) Copy() *Column

Copy returns a copy of the column

func (*Column) HasAttribute added in v0.2.0

func (c *Column) HasAttribute(attr AttributeType) bool

HasAttribute returns true if the column has the given attribute.

type DataType added in v0.2.0

type DataType struct {
	// Name is the name of the type.
	Name string `json:"name"`
	// IsArray is true if the type is an array.
	IsArray bool `json:"is_array"`
	// Metadata is the metadata of the type.
	Metadata [2]uint16 `json:"metadata"`
}

DataType is a data type. It includes both built-in types and user-defined types.

func ArrayType added in v0.2.0

func ArrayType(t *DataType) *DataType

ArrayType creates an array type of the given type. It panics if the type is already an array.

func NewDecimalType added in v0.2.0

func NewDecimalType(precision, scale uint16) (*DataType, error)

NewDecimalType creates a new fixed point decimal type.

func (*DataType) Clean added in v0.2.0

func (c *DataType) Clean() error

func (*DataType) Copy added in v0.2.0

func (c *DataType) Copy() *DataType

Copy returns a copy of the type.

func (*DataType) Equals added in v0.2.0

func (c *DataType) Equals(other *DataType) bool

Equals returns true if the type is equal to the other type, or if either type is null.

func (*DataType) EqualsStrict added in v0.2.0

func (c *DataType) EqualsStrict(other *DataType) bool

EqualsStrict returns true if the type is equal to the other type. The types must be exactly the same, including metadata.

func (*DataType) IsNumeric added in v0.2.0

func (c *DataType) IsNumeric() bool

func (*DataType) PGString added in v0.2.0

func (c *DataType) PGString() (string, error)

PGString returns the string representation of the type in Postgres.

func (*DataType) String added in v0.2.0

func (c *DataType) String() string

String returns the string representation of the type.

type DatasetIdentifier

type DatasetIdentifier struct {
	Name  string   `json:"name"`
	Owner HexBytes `json:"owner"`
	DBID  string   `json:"dbid"`
}

DatasetIdentifier contains the information required to identify a dataset.

type Extension added in v0.2.0

type Extension struct {
	// Name is the name of the extension registered in the node
	Name string `json:"name"`
	// Initialization is a list of key value pairs that are used to initialize the extension
	Initialization []*ExtensionConfig `json:"initialization"`
	// Alias is the alias of the extension, which is how its instance is referred to in the schema
	Alias string `json:"alias"`
}

Extension defines what extensions the schema uses, and how they are initialized.

func (*Extension) Clean added in v0.2.0

func (e *Extension) Clean() error

Clean validates rules about the data in the struct (naming conventions, syntax, etc.).

func (*Extension) CleanMap added in v0.2.0

func (e *Extension) CleanMap() map[string]string

CleanMap returns a map of the config values for the extension. Since the Kueiform parser parses all values as strings, it cleans the single quotes from the values.

type ExtensionConfig added in v0.2.0

type ExtensionConfig struct {
	Key   string `json:"name"`
	Value string `json:"value"`
}

ExtensionConfig is a key value pair that represents a configuration value for an extension

type ForeignKey added in v0.2.0

type ForeignKey struct {
	// ChildKeys are the columns that are referencing another.
	// For example, in FOREIGN KEY (a) REFERENCES tbl2(b), "a" is the child key
	ChildKeys []string `json:"child_keys"`

	// ParentKeys are the columns that are being referred to.
	// For example, in FOREIGN KEY (a) REFERENCES tbl2(b), "b" is the parent key
	ParentKeys []string `json:"parent_keys"`

	// ParentTable is the table that holds the parent columns.
	// For example, in FOREIGN KEY (a) REFERENCES tbl2(b), "tbl2" is the parent table
	ParentTable string `json:"parent_table"`

	// Action refers to what the foreign key should do when the parent is altered.
	// This is NOT the same as a database action;
	// however sqlite's docs refer to these as actions,
	// so we should be consistent with that.
	// For example, ON DELETE CASCADE is a foreign key action
	Actions []*ForeignKeyAction `json:"actions"`
}

ForeignKey is a foreign key in a table.

func (*ForeignKey) Clean added in v0.2.0

func (f *ForeignKey) Clean(currentTable *Table, allTables []*Table) error

Clean runs a set of validations and cleans the foreign key

func (*ForeignKey) Copy added in v0.2.0

func (f *ForeignKey) Copy() *ForeignKey

Copy returns a copy of the foreign key

type ForeignKeyAction added in v0.2.0

type ForeignKeyAction struct {
	// On can be either "UPDATE" or "DELETE"
	On ForeignKeyActionOn `json:"on"`

	// Do specifies what a foreign key action should do
	Do ForeignKeyActionDo `json:"do"`
}

ForeignKeyAction is used to specify what should occur if a parent key is updated or deleted

func (*ForeignKeyAction) Clean added in v0.2.0

func (f *ForeignKeyAction) Clean() error

Clean runs a set of validations and cleans the attributes in ForeignKeyAction

func (*ForeignKeyAction) Copy added in v0.2.0

Copy returns a copy of the foreign key action

type ForeignKeyActionDo added in v0.2.0

type ForeignKeyActionDo string

ForeignKeyActionDo specifies what should be done when a foreign key action is triggered.

const (
	// DO_NO_ACTION does nothing when a parent key is altered
	DO_NO_ACTION ForeignKeyActionDo = "NO ACTION"

	// DO_RESTRICT prevents the parent key from being altered
	DO_RESTRICT ForeignKeyActionDo = "RESTRICT"

	// DO_SET_NULL sets the child key(s) to NULL
	DO_SET_NULL ForeignKeyActionDo = "SET NULL"

	// DO_SET_DEFAULT sets the child key(s) to their default values
	DO_SET_DEFAULT ForeignKeyActionDo = "SET DEFAULT"

	// DO_CASCADE updates the child key(s) or deletes the records (depending on the action type)
	DO_CASCADE ForeignKeyActionDo = "CASCADE"
)

ForeignKeyActionDo types

func (*ForeignKeyActionDo) Clean added in v0.2.0

func (f *ForeignKeyActionDo) Clean() error

Clean checks the validity or the string, and converts it to the correct case

func (*ForeignKeyActionDo) IsValid added in v0.2.0

func (f *ForeignKeyActionDo) IsValid() bool

IsValid checks if the string is a valid ForeignKeyActionDo

func (ForeignKeyActionDo) String added in v0.2.0

func (f ForeignKeyActionDo) String() string

String returns the ForeignKeyActionDo as a string

type ForeignKeyActionOn added in v0.2.0

type ForeignKeyActionOn string

ForeignKeyActionOn specifies when a foreign key action should occur. It can be either "UPDATE" or "DELETE".

const (
	// ON_UPDATE is used to specify an action should occur when a parent key is updated
	ON_UPDATE ForeignKeyActionOn = "UPDATE"
	// ON_DELETE is used to specify an action should occur when a parent key is deleted
	ON_DELETE ForeignKeyActionOn = "DELETE"
)

ForeignKeyActionOn types

func (*ForeignKeyActionOn) Clean added in v0.2.0

func (f *ForeignKeyActionOn) Clean() error

Clean checks whether the string is valid, and will convert it to the correct case.

func (*ForeignKeyActionOn) IsValid added in v0.2.0

func (f *ForeignKeyActionOn) IsValid() bool

IsValid checks whether or not the string is a valid ForeignKeyActionOn

func (ForeignKeyActionOn) String added in v0.2.0

func (f ForeignKeyActionOn) String() string

String returns the ForeignKeyActionOn as a string

type ForeignProcedure added in v0.2.0

type ForeignProcedure struct {
	// Name is the name of the foreign procedure.
	Name string `json:"name"`
	// Parameters are the parameters of the foreign procedure.
	Parameters []*DataType `json:"parameters"`
	// Returns specifies what the foreign procedure returns.
	// If it does not return a table, the names of the return
	// values are not needed, and should be left empty.
	Returns *ProcedureReturn `json:"return_types"`
}

ForeignProcedure is used to define foreign procedures that can be dynamically called by the procedure.

func (*ForeignProcedure) Clean added in v0.2.0

func (f *ForeignProcedure) Clean() error

type HexBytes

type HexBytes []byte

HexBytes is used to decode hexadecimal text into a byte slice.

func (HexBytes) Format added in v0.2.0

func (hb HexBytes) Format(s fmt.State, verb rune)

Format writes either address of 0th element in a slice in base 16 notation, with leading 0x (%p), or casts HexBytes to bytes and writes as hexadecimal string to s.

func (HexBytes) MarshalJSON

func (hb HexBytes) MarshalJSON() ([]byte, error)

MarshalJSON satisfies the json.Marshaler interface.

func (HexBytes) String

func (hb HexBytes) String() string

func (*HexBytes) UnmarshalJSON

func (hb *HexBytes) UnmarshalJSON(b []byte) error

UnmarshalText satisfies the json.Unmarshaler interface.

type Index added in v0.2.0

type Index struct {
	Name    string    `json:"name"`
	Columns []string  `json:"columns"`
	Type    IndexType `json:"type"`
}

Index is an index on a table.

func (*Index) Clean added in v0.2.0

func (i *Index) Clean(tbl *Table) error

Clean validates rules about the data in the struct (naming conventions, syntax, etc.).

func (*Index) Copy added in v0.2.0

func (i *Index) Copy() *Index

Copy returns a copy of the index.

type IndexType added in v0.2.0

type IndexType string

IndexType is a type of index (e.g. BTREE, UNIQUE_BTREE, PRIMARY)

const (
	// BTREE is the default index type.
	BTREE IndexType = "BTREE"
	// UNIQUE_BTREE is a unique BTREE index.
	UNIQUE_BTREE IndexType = "UNIQUE_BTREE"
	// PRIMARY is a primary index.
	// Only one primary index is allowed per table.
	// A primary index cannot exist on a table that also has a primary key.
	PRIMARY IndexType = "PRIMARY"
)

index types

func (*IndexType) Clean added in v0.2.0

func (i *IndexType) Clean() error

func (*IndexType) IsValid added in v0.2.0

func (i *IndexType) IsValid() bool

func (IndexType) String added in v0.2.0

func (i IndexType) String() string

type JoinRequest

type JoinRequest struct {
	Candidate []byte   `json:"candidate"`  // pubkey of the candidate validator
	Power     int64    `json:"power"`      // the requested power
	ExpiresAt int64    `json:"expires_at"` // the block height at which the join request expires
	Board     [][]byte `json:"board"`      // slice of pubkeys of all the eligible voting validators
	Approved  []bool   `json:"approved"`   // slice of bools indicating if the corresponding validator approved
}

type Modifier added in v0.2.0

type Modifier string

Modifier modifies the access to a procedure.

const (
	// View means that an action does not modify the database.
	ModifierView Modifier = "VIEW"

	// Authenticated requires that the caller is identified.
	ModifierAuthenticated Modifier = "AUTHENTICATED"

	// Owner requires that the caller is the owner of the database.
	ModifierOwner Modifier = "OWNER"
)

func (*Modifier) Clean added in v0.2.0

func (m *Modifier) Clean() error

Clean validates rules about the data in the struct (naming conventions, syntax, etc.).

func (*Modifier) IsValid added in v0.2.0

func (m *Modifier) IsValid() bool

func (Modifier) String added in v0.2.0

func (m Modifier) String() string

type NamedType added in v0.2.0

type NamedType struct {
	// Name is the name of the column.
	Name string `json:"name"`
	// Type is the type of the column.
	Type *DataType `json:"type"`
}

NamedType is a single column in a RETURN TABLE(...) statement in a procedure.

func (*NamedType) Clean added in v0.2.0

func (p *NamedType) Clean() error

func (*NamedType) Copy added in v0.2.0

func (p *NamedType) Copy() *NamedType

type Procedure added in v0.2.0

type Procedure struct {
	// Name is the name of the procedure.
	// It should always be lower case.
	Name string `json:"name"`

	// Parameters are the parameters of the procedure.
	Parameters []*ProcedureParameter `json:"parameters"`

	// Public is true if the procedure is public.
	Public bool `json:"public"`

	// Modifiers are the modifiers of the procedure.
	Modifiers []Modifier `json:"modifiers"`

	// Body is the body of the procedure.
	Body string `json:"body"`

	// Returns is the return type of the procedure.
	Returns *ProcedureReturn `json:"return_types"`
	// Annotations are the annotations of the procedure.
	Annotations []string `json:"annotations"`
}

func (*Procedure) Clean added in v0.2.0

func (p *Procedure) Clean() error

func (*Procedure) IsOwnerOnly added in v0.2.0

func (p *Procedure) IsOwnerOnly() bool

IsOwnerOnly returns true if the procedure has an owner modifier.

func (*Procedure) IsView added in v0.2.0

func (p *Procedure) IsView() bool

IsView returns true if the procedure has a view modifier.

type ProcedureParameter added in v0.2.0

type ProcedureParameter struct {
	// Name is the name of the parameter.
	// It should always be lower case.
	Name string `json:"name"`
	// Type is the type of the parameter.
	Type *DataType `json:"type"`
}

ProcedureParameter is a parameter in a procedure.

func (*ProcedureParameter) Clean added in v0.2.0

func (c *ProcedureParameter) Clean() error

type ProcedureReturn added in v0.2.0

type ProcedureReturn struct {
	IsTable bool         `json:"is_table"`
	Fields  []*NamedType `json:"fields"`
}

ProcedureReturn holds the return type of a procedure. EITHER the Type field is set, OR the Table field is set.

func (*ProcedureReturn) Clean added in v0.2.0

func (p *ProcedureReturn) Clean() error

func (*ProcedureReturn) Copy added in v0.2.0

func (p *ProcedureReturn) Copy() *ProcedureReturn

type Schema added in v0.2.0

type Schema struct {
	// Name is the name of the schema given by the deployer.
	Name string `json:"name"`
	// Owner is the identifier (generally an address in bytes or public key) of the owner of the schema
	Owner             HexBytes            `json:"owner"`
	Extensions        []*Extension        `json:"extensions"`
	Tables            []*Table            `json:"tables"`
	Actions           []*Action           `json:"actions"`
	Procedures        []*Procedure        `json:"procedures"`
	ForeignProcedures []*ForeignProcedure `json:"foreign_calls"`
}

Schema is a database schema that contains tables, procedures, and extensions.

func (*Schema) Clean added in v0.2.0

func (s *Schema) Clean() (err error)

Clean validates rules about the data in the struct (naming conventions, syntax, etc.).

func (*Schema) DBID added in v0.2.0

func (s *Schema) DBID() string

func (*Schema) FindAction added in v0.2.0

func (s *Schema) FindAction(name string) (action *Action, found bool)

FindAction finds an action based on its name. It returns false if the action is not found.

func (*Schema) FindExtensionImport added in v0.2.0

func (s *Schema) FindExtensionImport(alias string) (extension *Extension, found bool)

FindExtensionImport finds an extension based on its alias. It returns false if the extension is not found.

func (*Schema) FindForeignProcedure added in v0.2.0

func (s *Schema) FindForeignProcedure(name string) (procedure *ForeignProcedure, found bool)

FindForeignProcedure finds a foreign procedure based on its name. It returns false if the procedure is not found.

func (*Schema) FindProcedure added in v0.2.0

func (s *Schema) FindProcedure(name string) (procedure *Procedure, found bool)

FindProcedure finds a procedure based on its name. It returns false if the procedure is not found.

func (*Schema) FindTable added in v0.2.0

func (s *Schema) FindTable(name string) (table *Table, found bool)

FindTable finds a table based on its name. It returns false if the table is not found.

type Table added in v0.2.0

type Table struct {
	Name        string        `json:"name"`
	Columns     []*Column     `json:"columns"`
	Indexes     []*Index      `json:"indexes"`
	ForeignKeys []*ForeignKey `json:"foreign_keys"`
}

Table is a table in a database schema.

func (*Table) Clean added in v0.2.0

func (t *Table) Clean(tables []*Table) error

Clean validates rules about the data in the struct (naming conventions, syntax, etc.). It takes a slice of all tables in the schema, which is used to check for foreign key references.

func (*Table) Copy added in v0.2.0

func (t *Table) Copy() *Table

Copy returns a copy of the table

func (*Table) FindColumn added in v0.2.0

func (t *Table) FindColumn(name string) (column *Column, found bool)

FindColumn finds a column based on its name. It returns false if the column is not found.

func (*Table) GetPrimaryKey added in v0.2.0

func (t *Table) GetPrimaryKey() ([]string, error)

GetPrimaryKey returns the names of the column(s) that make up the primary key. If there is more than one, or no primary key, an error is returned.

type UUID

type UUID [16]byte

UUID is a rfc4122 compliant uuidv5

func NewUUIDV5

func NewUUIDV5(from []byte) *UUID

NewUUIDV5 generates a uuidv5 from a byte slice. This is used to deterministically generate uuids.

func NewUUIDV5WithNamespace added in v0.2.0

func NewUUIDV5WithNamespace(namespace UUID, from []byte) UUID

NewUUIDV5WithNamespace generates a uuidv5 from a byte slice and a namespace. This is used to deterministically generate uuids.

func ParseUUID added in v0.2.0

func ParseUUID(s string) (*UUID, error)

ParseUUID parses a uuid from a string

func (*UUID) Bytes added in v0.2.0

func (u *UUID) Bytes() []byte

func (UUID) MarshalJSON added in v0.2.0

func (u UUID) MarshalJSON() ([]byte, error)

Over json, we want to send uuids as strings

func (*UUID) Scan

func (u *UUID) Scan(src any) error

func (UUID) String

func (u UUID) String() string

String returns the string representation of the uuid

func (*UUID) UnmarshalJSON added in v0.2.0

func (u *UUID) UnmarshalJSON(b []byte) error

func (UUID) Value

func (u UUID) Value() (driver.Value, error)

type UUIDArray

type UUIDArray []*UUID

UUIDArray is a slice of UUIDs. It is used to store arrays of UUIDs in the database.

func (UUIDArray) Bytes added in v0.2.0

func (u UUIDArray) Bytes() [][]byte

func (*UUIDArray) Scan

func (u *UUIDArray) Scan(src any) error

func (UUIDArray) Value

func (u UUIDArray) Value() (driver.Value, error)

type Uint256 added in v0.2.0

type Uint256 struct {
	uint256.Int
}

Uint256 is a 256-bit unsigned integer. It is mostly a wrapper around github.com/holiman/uint256.Int, but includes extra methods for usage in Postgres.

func Uint256FromBig added in v0.2.0

func Uint256FromBig(i *big.Int) (*Uint256, error)

Uint256FromBig creates a new Uint256 from a big.Int.

func Uint256FromBytes added in v0.2.0

func Uint256FromBytes(b []byte) (*Uint256, error)

Uint256FromBytes creates a new Uint256 from a byte slice.

func Uint256FromInt added in v0.2.0

func Uint256FromInt(i uint64) *Uint256

Uint256FromInt creates a new Uint256 from an int.

func Uint256FromString added in v0.2.0

func Uint256FromString(s string) (*Uint256, error)

Uint256FromString creates a new Uint256 from a string.

func (Uint256) MarshalJSON added in v0.2.0

func (u Uint256) MarshalJSON() ([]byte, error)

func (*Uint256) Scan added in v0.2.0

func (u *Uint256) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (*Uint256) UnmarshalJSON added in v0.2.0

func (u *Uint256) UnmarshalJSON(b []byte) error

func (Uint256) Value added in v0.2.0

func (u Uint256) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type Uint256Array added in v0.2.0

type Uint256Array []*Uint256

Uint256Array is an array of Uint256s.

func (*Uint256Array) Scan added in v0.2.0

func (ua *Uint256Array) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (Uint256Array) Value added in v0.2.0

func (ua Uint256Array) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type Validator

type Validator struct {
	PubKey []byte `json:"pubkey"`
	Power  int64  `json:"power"`
}

func (*Validator) String

func (v *Validator) String() string

type ValidatorRemoveProposal

type ValidatorRemoveProposal struct {
	Target  []byte `json:"target"`  // pubkey of the validator to remove
	Remover []byte `json:"remover"` // pubkey of the validator proposing the removal
}

ValidatorRemoveProposal is a proposal from an existing validator (remover) to remove a validator (the target) from the validator set.

type VotableEvent

type VotableEvent struct {
	Type string `json:"type"`
	Body []byte `json:"body"`
}

VotableEvent is an event that can be voted. It contains an event type and a body. An ID can be generated from the event type and body.

func (*VotableEvent) ID

func (e *VotableEvent) ID() *UUID

Directories

Path Synopsis
_numbers
big
Package types contains the type used by the administrative RPC client and servers.
Package types contains the type used by the administrative RPC client and servers.
Package client contains the shared client types, including the options used to construct a Client instance, and the records iterator used to represent the results of an action call.
Package client contains the shared client types, including the options used to construct a Client instance, and the records iterator used to represent the results of an action call.
package Decimal implements a fixed-point decimal number.
package Decimal implements a fixed-point decimal number.
Package transactions contains all the logic for creating and validating transactions and call messages.
Package transactions contains all the logic for creating and validating transactions and call messages.

Jump to

Keyboard shortcuts

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