Documentation
¶
Index ¶
- type ClusterRow
- type ClusterTable
- func (s *ClusterTable) Delete(ctx context.Context, execer sqlx.ExecerContext, ...) error
- func (s *ClusterTable) Get(ctx context.Context, keys ClusterTableGetKeys) (ClusterRow, error)
- func (s *ClusterTable) Insert(ctx context.Context, execer sqlx.ExecerContext, row ClusterRow) error
- func (s *ClusterTable) List(ctx context.Context, filters ClusterTableSelectFilters) ([]ClusterRow, error)
- func (s *ClusterTable) Update(ctx context.Context, execer sqlx.ExecerContext, ...) error
- type ClusterTableGetKeys
- type ClusterTableSelectFilters
- type ClusterTableUpdateFields
- type ClusterTableUpdateKey
- type NodeRow
- type NodeTable
- func (s *NodeTable) Delete(ctx context.Context, execer sqlx.ExecerContext, updateKey NodeTableUpdateKey) error
- func (s *NodeTable) Get(ctx context.Context, keys NodeTableGetKeys) (NodeRow, error)
- func (s *NodeTable) Insert(ctx context.Context, execer sqlx.ExecerContext, row NodeRow) error
- func (s *NodeTable) List(ctx context.Context, filters NodeTableSelectFilters) ([]NodeRow, error)
- func (s *NodeTable) Update(ctx context.Context, execer sqlx.ExecerContext, updateKey NodeTableUpdateKey, ...) error
- type NodeTableGetKeys
- type NodeTableSelectFilters
- type NodeTableUpdateFields
- type NodeTableUpdateKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterRow ¶
type ClusterRow struct {
ID string `db:"id" orm:"op=get key=primary filter=In"`
Version uint64 `db:"version" orm:"op_lock=true filter=Gte,Lte,Eq"`
CreatedAt int64 `db:"created_at"`
LastUpdatedAt int64 `db:"last_updated_at" orm:"op=update"`
DeletedAt int64 `db:"deleted_at" orm:"soft_delete=true"`
Name string `db:"name" orm:"op=get filter=In"`
ClusterManagerID string `db:"cluster_manager_id" orm:"key=primary filter=In"`
State string `db:"state" orm:"op=update filter=In,NotIn"`
Message string `db:"message" orm:"op=update"`
}
type ClusterTable ¶
func NewClusterTable ¶
func NewClusterTable(db simplesql.Database) *ClusterTable
func (*ClusterTable) Delete ¶
func (s *ClusterTable) Delete(ctx context.Context, execer sqlx.ExecerContext, updateKey ClusterTableUpdateKey) error
func (*ClusterTable) Get ¶
func (s *ClusterTable) Get(ctx context.Context, keys ClusterTableGetKeys) (ClusterRow, error)
func (*ClusterTable) Insert ¶
func (s *ClusterTable) Insert(ctx context.Context, execer sqlx.ExecerContext, row ClusterRow) error
func (*ClusterTable) List ¶
func (s *ClusterTable) List(ctx context.Context, filters ClusterTableSelectFilters) ([]ClusterRow, error)
func (*ClusterTable) Update ¶
func (s *ClusterTable) Update( ctx context.Context, execer sqlx.ExecerContext, updateKey ClusterTableUpdateKey, updateFields ClusterTableUpdateFields, ) error
type ClusterTableGetKeys ¶
type ClusterTableSelectFilters ¶
type ClusterTableSelectFilters struct {
IDIn []string `db:"id:in"`
VersionGte *uint64 `db:"version:gte"`
VersionLte *uint64 `db:"version:lte"`
VersionEq *uint64 `db:"version:eq"`
DeletedAtEq *int64 `db:"deleted_at:eq"`
DeletedAtGte *int64 `db:"deleted_at:gte"`
NameIn []string `db:"name:in"`
ClusterManagerIDIn []string `db:"cluster_manager_id:in"`
StateIn []string `db:"state:in"`
StateNotIn []string `db:"state:not_in"`
Limit uint32 `db:"limit"`
}
type ClusterTableUpdateKey ¶
type NodeTable ¶ added in v0.0.4
func NewNodeTable ¶ added in v0.0.4
func (*NodeTable) Delete ¶ added in v0.0.4
func (s *NodeTable) Delete(ctx context.Context, execer sqlx.ExecerContext, updateKey NodeTableUpdateKey) error
func (*NodeTable) Update ¶ added in v0.0.4
func (s *NodeTable) Update( ctx context.Context, execer sqlx.ExecerContext, updateKey NodeTableUpdateKey, updateFields NodeTableUpdateFields, ) error
type NodeTableGetKeys ¶ added in v0.0.4
type NodeTableGetKeys struct {
ID *string `db:"id"`
}
type NodeTableSelectFilters ¶ added in v0.0.4
type NodeTableUpdateFields ¶ added in v0.0.4
type NodeTableUpdateFields struct {
Name *string `db:"name"`
}
type NodeTableUpdateKey ¶ added in v0.0.4
type NodeTableUpdateKey struct {
ID string `db:"id"`
}
Click to show internal directories.
Click to hide internal directories.