storage

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Celestial

type Celestial struct {
	bun.BaseModel `bun:"celestial" comment:"Table with celestial ids."`

	Id        string `bun:"id,pk,notnull" comment:"Celestial id"`
	AddressId uint64 `bun:"address_id"    comment:"Internal address identity for connected address"`
	ImageUrl  string `bun:"image_url"     comment:"Image url"`
	ChangeId  int64  `bun:"change_id"     comment:"Id of the last change of celestial id"`
}

func (Celestial) String

func (cid Celestial) String() string

func (Celestial) TableName

func (Celestial) TableName() string

type CelestialState

type CelestialState struct {
	bun.BaseModel `bun:"celestial_state" comment:"Table with celestial ids."`

	Name     string `bun:"name,pk,notnull" comment:"Celestial id indexer name"`
	ChangeId int64  `bun:"change_id"       comment:"Id of the last change of celestial id"`
}

func (CelestialState) String

func (cid CelestialState) String() string

func (CelestialState) TableName

func (CelestialState) TableName() string

type CelestialTransaction

type CelestialTransaction interface {
	SaveCelestials(ctx context.Context, celestials ...Celestial) error
	UpdateState(ctx context.Context, state *CelestialState) error

	sdk.Transaction
}

type ICelestial

type ICelestial interface {
	ById(ctx context.Context, id string) (Celestial, error)
	ByAddressId(ctx context.Context, addressId uint64, limit, offset int) ([]Celestial, error)
}

type ICelestialState

type ICelestialState interface {
	ByName(ctx context.Context, name string) (CelestialState, error)
	Save(ctx context.Context, state *CelestialState) error
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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