state

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConnection added in v0.1.16

func CheckConnection(db *gorm.DB) error

CheckConnection

func OpenConnection

func OpenConnection(ctx context.Context, cfg config.Database) (*gorm.DB, error)

OpenConnection -

Types

type State

type State struct {
	IndexName string `gorm:"primaryKey" json:"index_name"`
	IndexType string `json:"index_type"`
	Hash      string `json:"hash,omitempty"`
	Level     uint64 `json:"level"`
	UpdatedAt int    `gorm:"autoUpdateTime"`
}

State -

func Get

func Get(db *gorm.DB, indexName string) (state State, err error)

Get -

func (State) TableName

func (State) TableName() string

TableName -

func (State) Update

func (s State) Update(db *gorm.DB) error

UpdateState -

Jump to

Keyboard shortcuts

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