Documentation ¶
Index ¶
- type Attribute
- func (a Attribute) GetAll() ([]Resource, error)
- func (mj *Attribute) MarshalJSON() ([]byte, error)
- func (mj *Attribute) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (a *Attribute) Plural() string
- func (a *Attribute) String() string
- func (uj *Attribute) UnmarshalJSON(input []byte) error
- func (uj *Attribute) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Attributes
- type Change
- func (c Change) GetAll() ([]Resource, error)
- func (mj *Change) MarshalJSON() ([]byte, error)
- func (mj *Change) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (c *Change) Plural() string
- func (uj *Change) UnmarshalJSON(input []byte) error
- func (uj *Change) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Changes
- type Circuit
- func (c Circuit) GetAll() ([]Resource, error)
- func (mj *Circuit) MarshalJSON() ([]byte, error)
- func (mj *Circuit) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (c *Circuit) Plural() string
- func (c *Circuit) String() string
- func (uj *Circuit) UnmarshalJSON(input []byte) error
- func (uj *Circuit) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Circuits
- type Constraints
- type Device
- func (d Device) GetAll() ([]Resource, error)
- func (mj *Device) MarshalJSON() ([]byte, error)
- func (mj *Device) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (d *Device) Plural() string
- func (d *Device) String() string
- func (uj *Device) UnmarshalJSON(input []byte) error
- func (uj *Device) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Devices
- type HardwareAddr
- type IP
- type IPNet
- type Interface
- func (i Interface) GetAll() ([]Resource, error)
- func (mj *Interface) MarshalJSON() ([]byte, error)
- func (mj *Interface) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (i *Interface) Plural() string
- func (i *Interface) String() string
- func (uj *Interface) UnmarshalJSON(input []byte) error
- func (uj *Interface) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Interfaces
- type Network
- func (n Network) GetAll() ([]Resource, error)
- func (mj *Network) MarshalJSON() ([]byte, error)
- func (mj *Network) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (n *Network) Network() net.IPNet
- func (n *Network) Plural() string
- func (n *Network) String() string
- func (uj *Network) UnmarshalJSON(input []byte) error
- func (uj *Network) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Networks
- type Permissions
- type Resource
- type Resources
- type Site
- func (s Site) GetAll() ([]Resource, error)
- func (mj *Site) MarshalJSON() ([]byte, error)
- func (mj *Site) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (s *Site) Plural() string
- func (s *Site) String() string
- func (uj *Site) UnmarshalJSON(input []byte) error
- func (uj *Site) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Sites
- type Time
- type User
- func (u User) GetAll() ([]Resource, error)
- func (mj *User) MarshalJSON() ([]byte, error)
- func (mj *User) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (u *User) Plural() string
- func (u *User) String() string
- func (uj *User) UnmarshalJSON(input []byte) error
- func (uj *User) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Users
- type Value
- func (v Value) GetAll() ([]Resource, error)
- func (mj *Value) MarshalJSON() ([]byte, error)
- func (mj *Value) MarshalJSONBuf(buf fflib.EncodingBuffer) error
- func (v *Value) Plural() string
- func (uj *Value) UnmarshalJSON(input []byte) error
- func (uj *Value) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
- type Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { Constraints Constraints Description string Display bool ID int64 Multi bool Name string Required bool ResourceName string `json:"resource_name"` SiteID int64 `json:"site_id"` }
Attribute contains Attribute definition
func (*Attribute) MarshalJSON ¶
func (*Attribute) MarshalJSONBuf ¶
func (mj *Attribute) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Attribute) UnmarshalJSON ¶
func (*Attribute) UnmarshalJSONFFLexer ¶
type Change ¶
type Change struct { ChangeAt time.Time `json:"change_at"` Event string ID int64 Resource interface{} ResourceID int64 `json:"resource_id"` ResourceName string `json:"resource_name"` Site Site User User }
Change contains Change definition
func (*Change) MarshalJSON ¶
func (*Change) MarshalJSONBuf ¶
func (mj *Change) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Change) UnmarshalJSON ¶
func (*Change) UnmarshalJSONFFLexer ¶
type Circuit ¶
type Circuit struct { AEndpoint int64 `json:"a_endpoint"` Attributes map[string]string ID int64 Name string ZEndpoint int64 `json:"z_endpoint"` }
Circuit contains Circuit definition
func (*Circuit) MarshalJSON ¶
func (*Circuit) MarshalJSONBuf ¶
func (mj *Circuit) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Circuit) UnmarshalJSON ¶
func (*Circuit) UnmarshalJSONFFLexer ¶
type Constraints ¶
type Constraints struct { AllowEmpty bool `json:"allow_empty"` Pattern string ValidValues []interface{} `json:"valid_values"` }
Constraints contains Attribute Constraints
func (*Constraints) MarshalJSON ¶
func (mj *Constraints) MarshalJSON() ([]byte, error)
func (*Constraints) MarshalJSONBuf ¶
func (mj *Constraints) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Constraints) UnmarshalJSON ¶
func (uj *Constraints) UnmarshalJSON(input []byte) error
func (*Constraints) UnmarshalJSONFFLexer ¶
func (uj *Constraints) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error
type Device ¶
type Device struct { Attributes map[string]string Hostname string ID int64 SiteID int64 `json:"site_id"` }
Device contains Device definition
func (*Device) MarshalJSON ¶
func (*Device) MarshalJSONBuf ¶
func (mj *Device) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Device) UnmarshalJSON ¶
func (*Device) UnmarshalJSONFFLexer ¶
type HardwareAddr ¶
type HardwareAddr struct{ net.HardwareAddr }
HardwareAddr is a wrapper around net.HardwareAddr to provide (Un)Marshaling ffjson: skip
func (*HardwareAddr) MarshalJSON ¶
func (mac *HardwareAddr) MarshalJSON() (text []byte, err error)
MarshalJSON converts from []byte into meaningful type
func (*HardwareAddr) UnmarshalJSON ¶
func (mac *HardwareAddr) UnmarshalJSON(text []byte) (err error)
UnmarshalJSON converts from []byte into meaningful type
type IP ¶
IP is a wrapper around net.IP to provide (Un)Marshaling ffjson: skip
func (*IP) MarshalJSON ¶
MarshalJSON converts from []byte into meaningful type
func (*IP) UnmarshalJSON ¶
UnmarshalJSON converts from []byte into meaningful type
type IPNet ¶
IPNet is a wrapper around net.IPNet to provide (Un)Marshaling ffjson: skip
func (*IPNet) MarshalJSON ¶
MarshalJSON converts from []byte into meaningful type
func (*IPNet) UnmarshalJSON ¶
UnmarshalJSON converts from []byte into meaningful type
type Interface ¶
type Interface struct { Addresses []IP Attributes map[string]string Description string Device int64 ID int64 MacAddress HardwareAddr `json:"mac_address"` Name string Networks []IPNet ParentID int64 `json:"parent_id"` Speed int64 Type int64 }
Interface contains Interface definition
func (*Interface) MarshalJSON ¶
func (*Interface) MarshalJSONBuf ¶
func (mj *Interface) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Interface) UnmarshalJSON ¶
func (*Interface) UnmarshalJSONFFLexer ¶
type Network ¶
type Network struct { Attributes map[string]string ID int64 IPVersion string `json:"ip_version"` IsIP bool `json:"is_ip"` NetworkAddress IP `json:"network_address"` ParentID int64 `json:"parent_id"` PrefixLength int `json:"prefix_length"` SiteID int64 `json:"site_id"` State string }
Network contains Network definition
func (*Network) MarshalJSON ¶
func (*Network) MarshalJSONBuf ¶
func (mj *Network) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Network) UnmarshalJSON ¶
func (*Network) UnmarshalJSONFFLexer ¶
type Permissions ¶
type Permissions map[string]struct { Permissions []string SiteID int64 `json:"site_id"` UserID int64 `json:"user_id"` }
Permissions contains Permissions for a User
type Site ¶
Site contains Site definition
func (*Site) MarshalJSON ¶
func (*Site) MarshalJSONBuf ¶
func (mj *Site) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*Site) UnmarshalJSON ¶
func (*Site) UnmarshalJSONFFLexer ¶
type Time ¶
Time is a wrapper around time.Time to provide (Un)Marshaling ffjson: skip
func (*Time) MarshalJSON ¶
MarshalJSON converts from []byte into meaningful type
func (*Time) UnmarshalJSON ¶
UnmarshalJSON converts from []byte into meaningful type
type User ¶
type User struct { Email conf.Email ID int64 Permissions Permissions }
User contains User definition
func (*User) MarshalJSON ¶
func (*User) MarshalJSONBuf ¶
func (mj *User) MarshalJSONBuf(buf fflib.EncodingBuffer) error
func (*User) UnmarshalJSON ¶
func (*User) UnmarshalJSONFFLexer ¶
type Value ¶
type Value struct { Attribute int64 ID int64 Name string ResourceID int64 `json:"resource_id"` ResourceName string `json:"resource_name"` Value string }
Value contains Value definition
func (*Value) MarshalJSON ¶
func (*Value) MarshalJSONBuf ¶
func (mj *Value) MarshalJSONBuf(buf fflib.EncodingBuffer) error