Documentation ¶
Index ¶
- Constants
- func Connect(host, user, password, name string) (*gorm.DB, error)
- func Persist(db *gorm.DB, info map[string]string) error
- func Prune(db *gorm.DB, keep time.Time) error
- func Retrieve(db *gorm.DB, keys ...string) (info map[string]string, err error)
- type ActualState
- type Diff
- type DiffAB
- type ExpectedState
- type Info
- type Scan
- type Target
Constants ¶
View Source
const ( FailedImports = "failed_imports" LastImport = "last_successful_import" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActualState ¶
type ActualState struct { Target State string `gorm:"type:state;not null"` ScanID time.Time `gorm:"primaryKey;index"` }
func CurrentState ¶
func CurrentState(db *gorm.DB) (state []ActualState, err error)
func (ActualState) MarshalJSON ¶
func (s ActualState) MarshalJSON() ([]byte, error)
type Diff ¶
func (Diff) MarshalJSON ¶
type DiffAB ¶
func (DiffAB) MarshalJSON ¶
type ExpectedState ¶
type ExpectedState struct { Target State string `gorm:"type:state;not null"` Comment string `gorm:"not null"` }
func (ExpectedState) MarshalJSON ¶
func (s ExpectedState) MarshalJSON() ([]byte, error)
type Scan ¶
type Scan struct { ID time.Time Ports []ActualState `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` }
func (Scan) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.