view

package
v0.0.0-...-193f563 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deleter

type Deleter interface {
	Delete(sqlID int) error
}

Deleter .

type Reader

type Reader interface {
	ListCommands() ([]*View, error)
	ListCommandsByDBName(databaseName string) ([]*View, error)
	Read(sqlID int) (*View, error)
}

Reader .

type View

type View struct {
	ID           int       `json:"id"`
	SQL          string    `json:"sql"`
	DatabaseName string    `json:"database_name"`
	CreatedAt    time.Time `json:"created_at"`
}

View .

func (*View) Validate

func (s *View) Validate(m sqlmapper.Mapper) (interface{}, error)

Validate validate a view

type WriteReadDeleter

type WriteReadDeleter interface {
	Reader
	Writer
	Deleter
}

WriteReadDeleter .

func NewBoltWriteReadDeleter

func NewBoltWriteReadDeleter(persistenceFileName string) WriteReadDeleter

NewBoltWriteReadDeleter Peristent Bolt

type Writer

type Writer interface {
	Write(sql *View) error
}

Writer .

Jump to

Keyboard shortcuts

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