mysql

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDBState

func NewDBState() states.StateStorage

func NewMysqlBackend

func NewMysqlBackend() states.Backend

Types

type MysqlBackend

type MysqlBackend struct {
	MysqlState
}

func (*MysqlBackend) ConfigSchema

func (b *MysqlBackend) ConfigSchema() cty.Type

ConfigSchema returns a description of the expected configuration structure for the receiving backend.

func (*MysqlBackend) Configure

func (b *MysqlBackend) Configure(obj cty.Value) error

Configure uses the provided configuration to set configuration fields within the MysqlState backend.

func (*MysqlBackend) StateStorage

func (b *MysqlBackend) StateStorage() states.StateStorage

StateStorage return a StateStorage to manage State stored in db

type MysqlState

type MysqlState struct {
	DB *sql.DB
}

func (*MysqlState) Apply

func (s *MysqlState) Apply(state *states.State) error

Apply save state in DB by add-only strategy.

func (*MysqlState) Delete

func (s *MysqlState) Delete(id string) error

func (*MysqlState) GetLatestState

func (s *MysqlState) GetLatestState(q *states.StateQuery) (*states.State, error)

Jump to

Keyboard shortcuts

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