dbclient

package
v0.0.0-...-110c355 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClosedClient = errors.New("use of closed fs client")

Functions

func JsonDecode

func JsonDecode(v interface{}, b []byte) error

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(db *gorm.DB) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Create

func (c *Client) Create(path string, data []byte) error

func (*Client) Delete

func (c *Client) Delete(path string) error

func (*Client) Details

func (c *Client) Details(path string) ([]string, error)

func (*Client) List

func (c *Client) List(path string) ([]string, error)

func (*Client) Read

func (c *Client) Read(path string) ([]byte, error)

func (*Client) SubList

func (c *Client) SubList(subPath string) (interface{}, error)

func (*Client) Update

func (c *Client) Update(path string, data []byte) error

type Group

type Group struct {
	Id         int           `json:"id"`
	Servers    []interface{} `json:"servers"`
	MasterAddr string        `json:"master_addr,omitempty"`

	Promoting struct {
		Index int    `json:"index,omitempty"`
		State string `json:"state,omitempty"`
	} `json:"promoting"`

	OutOfSync   bool  `json:"out_of_sync,omitempty"`
	IsExpanding bool  `json:"is_expanding"`
	UpdateTime  int64 `json:"update_time"`
}

type TblDashboard

type TblDashboard struct {
	ID          uint   `gorm:"column:id"`
	ClusterName string `gorm:"column:product_name"`
	SubPath     string `gorm:"column:sub_path"`
	FullPath    string `gorm:"column:full_path"`
	Value       string `gorm:"column:value"`
	CreateTime  int64  `gorm:"column:create_time"`
	UpdateTime  int64  `gorm:"column:update_time"`
}

func (TblDashboard) TableName

func (TblDashboard) TableName() string

Jump to

Keyboard shortcuts

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