doittypes: github.com/DevOpsInvTech/doittypes Index | Files

package doittypes

import "github.com/DevOpsInvTech/doittypes"

Index

Package Files

doit_ansible.go doit_domain.go doit_group.go doit_host.go doit_var.go

type Ansible Uses

type Ansible interface {
    //MarshalAnsilbe
    MarshalAnsible() map[string]interface{}
}

Ansile interface to marshal a struct into an ansible consumable JSON structure

type Domain Uses

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 Uses

func (d *Domain) MarshalAnsible() map[string]interface{}

MarshalAnsilbe mashals the struct into an Ansible supported JSON

type Group Uses

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 Uses

func (g *Group) MarshalAnsible() map[string]interface{}

MarshalAnsilbe mashals the struct into an Ansible supported JSON

type GroupMatrix Uses

type GroupMatrix struct {
    ID      int `sql:"not null;unique;AUTO_INCREMENT" json:"id"`
    GroupID int
    Groups  []Group `gorm:"many2many:group_groupmatrixes;"`
}

type Host Uses

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 Uses

func (h *Host) MarshalAnsible() map[string]interface{}

MarshalAnsilbe mashals the struct into an Ansible supported JSON

type Var Uses

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 Uses

func (v *Var) MarshalAnsible() map[string]interface{}

MarshalAnsilbe mashals the struct into an Ansible supported JSON

Package doittypes imports 3 packages (graph) and is imported by 1 packages. Updated 2016-07-23. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).