cluster

package
v0.0.0-...-bcfd2cf Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(r *postgres.Pg, c *cache.Cache) *service

NewService instantiates a new Service layer for customer

func Routes

func Routes(g *echo.Group, s Service)

Routes mounts all /clusters based routes on the main group

Types

type Model

type Model struct {
	gorm.Model
	ID      uuid.UUID `json:"id" gorm:"primarykey;index;unique"`
	Address string    `json:"address" validate:"required,btc_addr|btc_addr_bech32" gorm:"index"`
	Cluster uint64    `json:"cluster" validate:"" gorm:"index"`

} //@name Cluster

Model cluster struct with validation

func (Model) TableName

func (m Model) TableName() string

TableName defines default table name

type Service

type Service interface {
	GetClusters(output bool) (tags []Model, err error)
	CreateCluster(t *Model) (err error)
	GetCluster(address string, output bool) (tags []Model, err error)
}

Service interface exports available methods for block service

Jump to

Keyboard shortcuts

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