Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ansible ¶
type Ansible interface {
//MarshalAnsilbe
MarshalAnsible() map[string]interface{}
}
Ansile interface to marshal a struct into an ansible consumable JSON structure
type Domain ¶
type Domain struct {
ID int `sql:"not null;unique;AUTO_INCREMENT" json:"id"`
Name string `sql:"unique" json:"name"`
Hosts []*Host `json:"hosts,omitempty"`
Vars []*Var `json:"vars,omitempty"`
Groups []*Group `json:"groups,omitempty"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
}
Domain a container for all related objects under the same namespace
func (*Domain) MarshalAnsible ¶
MarshalAnsilbe mashals the struct into an Ansible supported JSON
type Group ¶
type Group struct {
ID int `sql:"not null;unique;AUTO_INCREMENT" json:"id"`
Name string `json:"name"`
Domain *Domain `json:"-"`
DomainID sql.NullInt64 `json:"-"`
Hosts []*Host `gorm:"many2many:group_hosts;" json:"hosts,omitempty"`
Vars []*Var `gorm:"many2many:group_vars;" json:"vars,omitempty"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
}
Group a container for host and var entities
func (*Group) MarshalAnsible ¶
MarshalAnsilbe mashals the struct into an Ansible supported JSON
type GroupMatrix ¶
type Host ¶
type Host struct {
ID int `sql:"not null;unique;AUTO_INCREMENT" json:"id"`
Name string `json:"name"`
Vars []*Var `gorm:"many2many:hostvars_vars;" json:"vars,omitempty"`
Domain *Domain `json:"-"`
DomainID sql.NullInt64 `json:"-"`
Group *Group `json:"-"`
GroupID sql.NullInt64 `json:"-"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
}
Host a representation of a host entity
func (*Host) MarshalAnsible ¶
MarshalAnsilbe mashals the struct into an Ansible supported JSON
type Var ¶
type Var struct {
ID int `sql:"not null;unique;AUTO_INCREMENT" json:"id"`
Domain *Domain `json:"-" `
DomainID sql.NullInt64 `json:"-"`
Host *Host `json:"-"`
HostID sql.NullInt64 `json:"-"`
Group *Group `json:"-"`
GroupID sql.NullInt64 `json:"-"`
Name string `json:"name"`
Value string `json:"value"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
}
Var Variable to add
func (*Var) MarshalAnsible ¶
MarshalAnsilbe mashals the struct into an Ansible supported JSON
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Godeps
|
|
|
_workspace/src/github.com/mattn/go-sqlite3
Package sqlite3 provides interface to SQLite3 databases.
|
Package sqlite3 provides interface to SQLite3 databases. |
Click to show internal directories.
Click to hide internal directories.