Documentation ¶
Index ¶
- type Alert
- type CacheGroup
- type CacheGroupResponse
- type Credentials
- type ParamResponse
- type Parameter
- type Profile
- type ProfileResponse
- type Result
- type Server
- type ServerResponse
- type Session
- func (to *Session) CRConfigRaw(cdn string) ([]byte, error)
- func (to *Session) CacheGroups() ([]CacheGroup, error)
- func (to *Session) Parameters(profileName string) ([]Parameter, error)
- func (to *Session) Profiles() ([]Profile, error)
- func (to *Session) Servers() ([]Server, error)
- func (to *Session) ServersFqdn(n string) (string, error)
- func (to *Session) ServersShortNameSearch(shortname string) ([]string, error)
- func (to *Session) TrafficMonitorConfig(cdn string) (TrafficMonitorConfig, error)
- func (to *Session) TrafficMonitorConfigMap(cdn string) (TrafficMonitorConfigMap, error)
- func (to *Session) TrafficRouterConfig(cdn string) (TrafficRouterConfig, error)
- func (to *Session) TrafficRouterConfigMap(cdn string) (TrafficRouterConfigMap, error)
- func (to *Session) TrafficRouterConfigRaw(cdn string) ([]byte, error)
- type TrafficMonitorConfig
- type TrafficMonitorConfigMap
- type TrafficRouterConfig
- type TrafficRouterConfigMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheGroup ¶
type CacheGroup struct { Name string `json:"name"` ShortName string `json:"shortName"` Latitude float64 `json:"latitude,string"` Longitude float64 `json:"longitude,string"` ParentName string `json:"parentCachegroupName,omitempty"` Type string `json:"typeName,omitempty"` LastUpdated string `json:"lastUpdated,omitempty"` }
type CacheGroupResponse ¶
type CacheGroupResponse struct { Version string `json:"version"` Response []CacheGroup `json:"response"` }
type Credentials ¶
type ParamResponse ¶
type ProfileResponse ¶
type Server ¶
type Server struct { DomainName string `json:"domainName"` HostName string `json:"hostName"` Id string `json:"id"` IloIpAddress string `json:"iloIpAddress"` IloIpGateway string `json:"iloIpGateway"` IloIpNetmask string `json:"iloIpNetmask"` IloPassword string `json:"iloPassword"` IloUsername string `json:"iloUsername"` InterfaceMtu string `json:"interfaceMtu"` InterfaceName string `json:"interfaceName"` Ip6Address string `json:"ip6Address"` Ip6Gateway string `json:"ip6Gateway"` IpAddress string `json:"ipAddress"` IpGateway string `json:"ipGateway"` IpNetoask string `json:"ipNetoask"` LastUpdated string `json:"lastUpdated"` Location string `json:"cachegroup"` MgmtIpAddress string `json:"mgmtIpAddress"` MgmtIpGateway string `json:"mgmtIpGateway"` MgmtIpNetoask string `json:"mgmtIpNetmask"` PhysLocation string `json:"physLocation"` Profile string `json:"profile"` Rack string `json:"rack"` RouterHostName string `json:"routerHostName"` RouterPortName string `json:"routerPortName"` Status string `json:"status"` TcpPort string `json:"tcpPort"` Type string `json:"type"` XmppId string `json:"xmppId"` XmppPasswd string `json:"xmppPasswd"` }
type ServerResponse ¶
type Session ¶
type Session struct { UserName string Password string Url string UserAgent *http.Client Cache map[string]cacheentry }
func Login ¶
Login to traffic_ops, the response should set the cookie for this session automatically. Start with to := traffic_ops.Login("user", "passwd", true) subsequent calls like to.GetData("datadeliveryservice") will be authenticated.
func (*Session) CacheGroups ¶
func (to *Session) CacheGroups() ([]CacheGroup, error)
CacheGroups Get the CacheGroups in an array of CacheGroup structs (note CacheGroup used to be called location)
func (*Session) Parameters ¶
Parameters Get an array of parameter structs for the profile given
func (*Session) ServersFqdn ¶
ServersFqdn Returns a the full domain name for the server short name passed in.
func (*Session) ServersShortNameSearch ¶
ShortNameSearch Returns a slice of short server names that match a greedy match.
func (*Session) TrafficMonitorConfig ¶
func (to *Session) TrafficMonitorConfig(cdn string) (TrafficMonitorConfig, error)
func (*Session) TrafficMonitorConfigMap ¶
func (to *Session) TrafficMonitorConfigMap(cdn string) (TrafficMonitorConfigMap, error)
func (*Session) TrafficRouterConfig ¶
func (to *Session) TrafficRouterConfig(cdn string) (TrafficRouterConfig, error)
get the json arrays
func (*Session) TrafficRouterConfigMap ¶
func (to *Session) TrafficRouterConfigMap(cdn string) (TrafficRouterConfigMap, error)
get a bunch of maps
type TrafficMonitorConfig ¶
type TrafficMonitorConfig struct { TrafficServers []trafficServer `json:"trafficServers"` CacheGroups []cacheGroup `json:"cacheGroups"` Config map[string]interface{} `json:"config"` TrafficMonitors []trafficMonitor `json:"trafficMonitors"` DeliveryServices []trafficMonitorDeliveryService `json:"deliveryServices"` Profiles []profile `json:"profiles"` }
type TrafficMonitorConfigMap ¶
type TrafficRouterConfig ¶
type TrafficRouterConfig struct { TrafficServers []trafficServer `json:"trafficServers"` TrafficMonitors []trafficMonitor `json:"trafficMonitors"` TrafficRouters []trafficRouter `json:"trafficRouters"` CacheGroups []cacheGroup `json:"cacheGroups"` DeliveryServices []deliveryService `json:"deliveryServices"` Stats map[string]interface{} `json:"stats"` Config map[string]interface{} `json:"config"` }
TrafficRouterConfig is the json unmarshalled without any changes note all structs are local to this file _except_ the TrafficRouterConfig struct.