Documentation ¶
Overview ¶
Package client provides Go bindings to the Traffic Ops RPC API.
Index ¶
- Constants
- type CacheEntry
- type CacheHitStatus
- type HTTPError
- type OuterResponse
- type ReqInf
- type Session
- func LoginWithAgent(toURL string, toUser string, toPasswd string, insecure bool, userAgent string, ...) (*Session, net.Addr, error)
- func LoginWithToken(toURL string, token string, insecure bool, userAgent string, useCache bool, ...) (*Session, net.Addr, error)
- func LogoutWithAgent(toURL string, toUser string, toPasswd string, insecure bool, userAgent string, ...) (*Session, net.Addr, error)
- func NewNoAuthSession(toURL string, insecure bool, userAgent string, useCache bool, ...) *Session
- func NewSession(user, password, url, userAgent string, client *http.Client, useCache bool) *Session
- func (to *Session) AddFederationResolverMappingsForCurrentUser(mappings tc.DeliveryServiceFederationResolverMappingRequest) (tc.Alerts, ReqInf, error)
- func (to *Session) AllFederations() ([]tc.AllDeliveryServiceFederationsMapping, ReqInf, error)
- func (to *Session) AllFederationsForCDN(cdnName string) ([]tc.AllDeliveryServiceFederationsMapping, ReqInf, error)
- func (to *Session) AssignDeliveryServiceIDsToServerID(server int, dsIDs []int, replace bool) (tc.Alerts, ReqInf, error)
- func (to *Session) AssignFederationFederationResolver(fedID int, resolverIDs []int, replace bool) (tc.AssignFederationFederationResolversResponse, ReqInf, error)
- func (to *Session) CopyProfile(p tc.ProfileCopy) (tc.ProfileCopyResponse, ReqInf, error)
- func (to *Session) CreateASN(entity tc.ASN) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateCDN(cdn tc.CDN) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateCDNFederationByName(f tc.CDNFederation, CDNName string) (*tc.CreateCDNFederationResponse, ReqInf, error)
- func (to *Session) CreateCacheGroupNullable(cachegroup tc.CacheGroupNullable) (*tc.CacheGroupDetailResponse, ReqInf, error)
- func (to *Session) CreateCacheGroupParameter(cacheGroupID, parameterID int) (*tc.CacheGroupParametersPostResponse, ReqInf, error)
- func (to *Session) CreateCapability(c tc.Capability) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateCoordinate(coordinate tc.Coordinate) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateDeliveryService(ds *tc.DeliveryService) (*tc.CreateDeliveryServiceResponse, error)
- func (to *Session) CreateDeliveryServiceNullable(ds *tc.DeliveryServiceNullable) (*tc.CreateDeliveryServiceNullableResponse, error)
- func (to *Session) CreateDeliveryServiceRequest(dsr tc.DeliveryServiceRequest) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateDeliveryServiceRequestComment(comment tc.DeliveryServiceRequestComment) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateDeliveryServiceServers(dsID int, serverIDs []int, replace bool) (*tc.DSServerIDs, error)
- func (to *Session) CreateDeliveryServicesRequiredCapability(capability tc.DeliveryServicesRequiredCapability) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateDivision(division tc.Division) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateFederationDeliveryServices(federationID int, deliveryServiceIDs []int, replace bool) (ReqInf, error)
- func (to *Session) CreateFederationResolver(fr tc.FederationResolver) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateFederationUsers(federationID int, userIDs []int, replace bool) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateInvalidationJob(job tc.InvalidationJobInput) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateMultipleParameters(pls []tc.Parameter) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateMultipleProfileParameters(pps []tc.ProfileParameter) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateOrigin(origin tc.Origin) (*tc.OriginDetailResponse, ReqInf, error)
- func (to *Session) CreateParameter(pl tc.Parameter) (tc.Alerts, ReqInf, error)
- func (to *Session) CreatePhysLocation(pl tc.PhysLocation) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateProfile(pl tc.Profile) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateProfileParameter(pp tc.ProfileParameter) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateRegion(region tc.Region) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateRole(region tc.Role) (tc.Alerts, ReqInf, int, error)
- func (to *Session) CreateServer(server tc.ServerV1) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateServerCapability(sc tc.ServerCapability) (*tc.ServerCapabilityDetailResponse, ReqInf, error)
- func (to *Session) CreateServerServerCapability(ssc tc.ServerServerCapability) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateStaticDNSEntry(sdns tc.StaticDNSEntry) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateStatus(status tc.Status) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateStatusNullable(status tc.StatusNullable) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateSteeringTarget(st tc.SteeringTargetNullable) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateSummaryStats(statsSummary tc.StatsSummary) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateTOExtension(toExtension tc.TOExtensionNullable) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateTenant(t *tc.Tenant) (*tc.TenantResponse, error)
- func (to *Session) CreateType(typ tc.Type) (tc.Alerts, ReqInf, error)
- func (to *Session) CreateUser(user *tc.User) (*tc.CreateUserResponse, ReqInf, error)
- func (to *Session) DeleteASNByASN(asn int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteCDNByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteCDNFederationByID(CDNName string, ID int) (*tc.DeleteCDNFederationResponse, ReqInf, error)
- func (to *Session) DeleteCacheGroupByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteCacheGroupParameter(cacheGroupID, parameterID int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteCoordinateByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteDeliveryService(id string) (*tc.DeleteDeliveryServiceResponse, error)
- func (to *Session) DeleteDeliveryServiceRequestByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteDeliveryServiceRequestCommentByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteDeliveryServiceServer(dsID int, serverID int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteDeliveryServiceUser(userID int, dsID int) (*tc.UserDeliveryServiceDeleteResponse, error)
- func (to *Session) DeleteDeliveryServicesRequiredCapability(deliveryserviceID int, capability string) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteDivisionByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteFederationDeliveryService(federationID, deliveryServiceID int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteFederationResolver(id uint) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteFederationResolverMappingsForCurrentUser() (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteFederationUser(federationID, userID int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteOriginByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteParameterByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteParameterByProfileParameter(profile int, parameter int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeletePhysLocationByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteProfileByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteRegion(id *int, name *string) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteRegionByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteRoleByID(id int) (tc.Alerts, ReqInf, int, error)
- func (to *Session) DeleteServerByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteServerCapability(name string) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteServerServerCapability(serverID int, serverCapability string) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteStaticDNSEntryByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteStatusByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteSteeringTarget(dsID int, targetID int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteTOExtension(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteTenant(id string) (*tc.DeleteTenantResponse, error)
- func (to *Session) DeleteTypeByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) DeleteUserByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) ErrUnlessOK(resp *http.Response, remoteAddr net.Addr, err error, path string) (*http.Response, net.Addr, error)
- func (to *Session) ExportProfile(id int) (*tc.ProfileExportResponse, ReqInf, error)
- func (to *Session) Federations() ([]tc.AllDeliveryServiceFederationsMapping, ReqInf, error)
- func (to *Session) GetAPICapabilities(capability string, order string) (tc.APICapabilityResponse, ReqInf, error)
- func (to *Session) GetASNByASN(asn int) ([]tc.ASN, ReqInf, error)
- func (to *Session) GetASNByID(id int) ([]tc.ASN, ReqInf, error)
- func (to *Session) GetASNs() ([]tc.ASN, ReqInf, error)
- func (to *Session) GetATSCDNConfig(cdnID int, fileName string) (string, ReqInf, error)
- func (to *Session) GetATSCDNConfigByName(cdnName string, fileName string) (string, ReqInf, error)
- func (to *Session) GetATSProfileConfig(profileID int, fileName string) (string, ReqInf, error)
- func (to *Session) GetATSProfileConfigByName(profileName string, fileName string) (string, ReqInf, error)
- func (to *Session) GetATSServerConfig(serverID int, fileName string) (string, ReqInf, error)
- func (to *Session) GetATSServerConfigByName(serverHostName string, fileName string) (string, ReqInf, error)
- func (to *Session) GetATSServerConfigList(serverID int) (tc.ATSConfigMetaData, ReqInf, error)
- func (to *Session) GetATSServerConfigListByName(serverHostName string) (tc.ATSConfigMetaData, ReqInf, error)
- func (to *Session) GetAbout() (map[string]string, ReqInf, error)
- func (to *Session) GetAllCacheGroupParameters() ([]tc.CacheGroupParametersResponseNullable, ReqInf, error)
- func (to *Session) GetCDNByID(id int) ([]tc.CDN, ReqInf, error)
- func (to *Session) GetCDNByName(name string) ([]tc.CDN, ReqInf, error)
- func (to *Session) GetCDNFederationsByID(CDNName string, ID int) (*tc.CDNFederationResponse, ReqInf, error)
- func (to *Session) GetCDNFederationsByName(CDNName string) (*tc.CDNFederationResponse, ReqInf, error)
- func (to *Session) GetCDNSSLKeys(name string) ([]tc.CDNSSLKeys, ReqInf, error)
- func (to *Session) GetCDNs() ([]tc.CDN, ReqInf, error)
- func (to *Session) GetCRConfig(cdn string) ([]byte, ReqInf, error)
- func (to *Session) GetCRConfigNew(cdn string) ([]byte, ReqInf, error)
- func (to *Session) GetCacheGroupNullableByID(id int) ([]tc.CacheGroupNullable, ReqInf, error)
- func (to *Session) GetCacheGroupNullableByName(name string) ([]tc.CacheGroupNullable, ReqInf, error)
- func (to *Session) GetCacheGroupParameters(cacheGroupID int) ([]tc.CacheGroupParameter, ReqInf, error)
- func (to *Session) GetCacheGroupParametersByQueryParams(cacheGroupID int, queryParams string) ([]tc.CacheGroupParameter, ReqInf, error)
- func (to *Session) GetCacheGroupUnassignedParameters(cacheGroupID int) ([]tc.CacheGroupParameter, ReqInf, error)
- func (to *Session) GetCacheGroupUnassignedParametersByQueryParams(cacheGroupID int, queryParams string) ([]tc.CacheGroupParameter, ReqInf, error)
- func (to *Session) GetCacheGroupsNullable() ([]tc.CacheGroupNullable, ReqInf, error)
- func (to *Session) GetCapabilities() ([]tc.Capability, ReqInf, error)
- func (to *Session) GetCapability(c string) (tc.Capability, ReqInf, error)
- func (to *Session) GetCoordinateByID(id int) ([]tc.Coordinate, ReqInf, error)
- func (to *Session) GetCoordinateByName(name string) ([]tc.Coordinate, ReqInf, error)
- func (to *Session) GetCoordinates() ([]tc.Coordinate, ReqInf, error)
- func (to *Session) GetCurrentStats() (tc.TrafficStatsCDNStatsResponse, ReqInf, error)
- func (to *Session) GetDeliveryService(id string) (*tc.DeliveryService, ReqInf, error)
- func (to *Session) GetDeliveryServiceByXMLIDNullable(XMLID string) ([]tc.DeliveryServiceNullable, ReqInf, error)
- func (to *Session) GetDeliveryServiceCapacity(id string) (*tc.DeliveryServiceCapacity, ReqInf, error)
- func (to *Session) GetDeliveryServiceHealth(id string) (*tc.DeliveryServiceHealth, ReqInf, error)
- func (to *Session) GetDeliveryServiceMatches() ([]tc.DeliveryServicePatterns, ReqInf, error)
- func (to *Session) GetDeliveryServiceNullable(id string) (*tc.DeliveryServiceNullable, ReqInf, error)
- func (to *Session) GetDeliveryServiceRegexes() ([]tc.DeliveryServiceRegexes, ReqInf, error)
- func (to *Session) GetDeliveryServiceRequestByID(id int) ([]tc.DeliveryServiceRequest, ReqInf, error)
- func (to *Session) GetDeliveryServiceRequestByXMLID(XMLID string) ([]tc.DeliveryServiceRequest, ReqInf, error)
- func (to *Session) GetDeliveryServiceRequestCommentByID(id int) ([]tc.DeliveryServiceRequestComment, ReqInf, error)
- func (to *Session) GetDeliveryServiceRequestComments() ([]tc.DeliveryServiceRequestComment, ReqInf, error)
- func (to *Session) GetDeliveryServiceRequests() ([]tc.DeliveryServiceRequest, ReqInf, error)
- func (to *Session) GetDeliveryServiceRouting(id string) (*tc.DeliveryServiceRouting, ReqInf, error)
- func (to *Session) GetDeliveryServiceSSLKeysByHostname(hostname string) (*tc.DeliveryServiceSSLKeys, ReqInf, error)
- func (to *Session) GetDeliveryServiceSSLKeysByID(id string) (*tc.DeliveryServiceSSLKeys, ReqInf, error)
- func (to *Session) GetDeliveryServiceServer(page, limit string) ([]tc.DeliveryServiceServer, ReqInf, error)
- func (to *Session) GetDeliveryServiceServers() (tc.DeliveryServiceServerResponse, ReqInf, error)
- func (to *Session) GetDeliveryServiceServersN(n int) (tc.DeliveryServiceServerResponse, ReqInf, error)
- func (to *Session) GetDeliveryServiceServersWithLimits(limit int, deliveryServiceIDs []int, serverIDs []int) (tc.DeliveryServiceServerResponse, ReqInf, error)
- func (to *Session) GetDeliveryServiceState(id string) (*tc.DeliveryServiceState, ReqInf, error)
- func (to *Session) GetDeliveryServiceURISigningKeys(dsName string) ([]byte, ReqInf, error)
- func (to *Session) GetDeliveryServiceURLSigKeys(dsName string) (tc.URLSigKeys, ReqInf, error)
- func (to *Session) GetDeliveryServices() ([]tc.DeliveryService, ReqInf, error)
- func (to *Session) GetDeliveryServicesByCDNID(cdnID int) ([]tc.DeliveryServiceNullable, ReqInf, error)
- func (to *Session) GetDeliveryServicesByServer(id int) ([]tc.DeliveryService, ReqInf, error)
- func (to *Session) GetDeliveryServicesEligible(dsID int) ([]tc.DSServerV11, ReqInf, error)
- func (to *Session) GetDeliveryServicesNullable() ([]tc.DeliveryServiceNullable, ReqInf, error)
- func (to *Session) GetDeliveryServicesRequiredCapabilities(deliveryServiceID *int, xmlID, capability *string) ([]tc.DeliveryServicesRequiredCapability, ReqInf, error)
- func (to *Session) GetDivisionByID(id int) ([]tc.Division, ReqInf, error)
- func (to *Session) GetDivisionByName(name string) ([]tc.Division, ReqInf, error)
- func (to *Session) GetDivisions() ([]tc.Division, ReqInf, error)
- func (to *Session) GetDomains() ([]tc.Domain, ReqInf, error)
- func (to *Session) GetFederationDeliveryServices(federationID int) ([]tc.FederationDeliveryServiceNullable, ReqInf, error)
- func (to *Session) GetFederationFederationResolversByID(id int) (tc.FederationFederationResolversResponse, ReqInf, error)
- func (to *Session) GetFederationResolverByID(ID uint) (tc.FederationResolver, ReqInf, error)
- func (to *Session) GetFederationResolverByIPAddress(ip string) (tc.FederationResolver, ReqInf, error)
- func (to *Session) GetFederationResolvers() ([]tc.FederationResolver, ReqInf, error)
- func (to *Session) GetFederationResolversByType(t string) ([]tc.FederationResolver, ReqInf, error)
- func (to *Session) GetFederationUsers(federationID int) ([]tc.FederationUser, ReqInf, error)
- func (to *Session) GetInvalidationJobs(ds *interface{}, user *interface{}) ([]tc.InvalidationJob, ReqInf, error)
- func (to *Session) GetJobs(deliveryServiceID *int, userID *int) ([]tc.Job, ReqInf, error)
- func (to *Session) GetLogs() ([]tc.Log, ReqInf, error)
- func (to *Session) GetLogsByDays(days int) ([]tc.Log, ReqInf, error)
- func (to *Session) GetLogsByLimit(limit int) ([]tc.Log, ReqInf, error)
- func (to *Session) GetLogsByQueryParams(queryParams string) ([]tc.Log, ReqInf, error)
- func (to *Session) GetOSVersions() (map[string]string, ReqInf, error)
- func (to *Session) GetOriginByID(id int) ([]tc.Origin, ReqInf, error)
- func (to *Session) GetOriginByName(name string) ([]tc.Origin, ReqInf, error)
- func (to *Session) GetOrigins() ([]tc.Origin, ReqInf, error)
- func (to *Session) GetOriginsByDeliveryServiceID(id int) ([]tc.Origin, ReqInf, error)
- func (to *Session) GetOriginsByQueryParams(queryParams string) ([]tc.Origin, ReqInf, error)
- func (to *Session) GetParameterByConfigFile(configFile string) ([]tc.Parameter, ReqInf, error)
- func (to *Session) GetParameterByID(id int) ([]tc.Parameter, ReqInf, error)
- func (to *Session) GetParameterByName(name string) ([]tc.Parameter, ReqInf, error)
- func (to *Session) GetParameterByNameAndConfigFile(name string, configFile string) ([]tc.Parameter, ReqInf, error)
- func (to *Session) GetParameterByNameAndConfigFileAndValue(name, configFile, value string) ([]tc.Parameter, ReqInf, error)
- func (to *Session) GetParameters() ([]tc.Parameter, ReqInf, error)
- func (to *Session) GetParametersByProfileName(profileName string) ([]tc.Parameter, ReqInf, error)
- func (to *Session) GetPhysLocationByID(id int) ([]tc.PhysLocation, ReqInf, error)
- func (to *Session) GetPhysLocationByName(name string) ([]tc.PhysLocation, ReqInf, error)
- func (to *Session) GetPhysLocations() ([]tc.PhysLocation, ReqInf, error)
- func (to *Session) GetProfileByCDNID(cdnID int) ([]tc.Profile, ReqInf, error)
- func (to *Session) GetProfileByID(id int) ([]tc.Profile, ReqInf, error)
- func (to *Session) GetProfileByName(name string) ([]tc.Profile, ReqInf, error)
- func (to *Session) GetProfileByParameter(param string) ([]tc.Profile, ReqInf, error)
- func (to *Session) GetProfileParameterByQueryParams(queryParams string) ([]tc.ProfileParameter, ReqInf, error)
- func (to *Session) GetProfileParameters() ([]tc.ProfileParameter, ReqInf, error)
- func (to *Session) GetProfiles() ([]tc.Profile, ReqInf, error)
- func (to *Session) GetRegionByID(id int) ([]tc.Region, ReqInf, error)
- func (to *Session) GetRegionByName(name string) ([]tc.Region, ReqInf, error)
- func (to *Session) GetRegionByNamePath(name string) ([]tc.RegionName, ReqInf, error)
- func (to *Session) GetRegions() ([]tc.Region, ReqInf, error)
- func (to *Session) GetRoleByID(id int) ([]tc.Role, ReqInf, int, error)
- func (to *Session) GetRoleByName(name string) ([]tc.Role, ReqInf, int, error)
- func (to *Session) GetRoleByQueryParams(queryParams map[string]string) ([]tc.Role, ReqInf, int, error)
- func (to *Session) GetRoles() ([]tc.Role, ReqInf, int, error)
- func (to *Session) GetServerByHostName(hostName string) ([]tc.ServerV1, ReqInf, error)
- func (to *Session) GetServerByID(id int) ([]tc.ServerV1, ReqInf, error)
- func (to *Session) GetServerCapabilities() ([]tc.ServerCapability, ReqInf, error)
- func (to *Session) GetServerCapability(name string) (*tc.ServerCapability, ReqInf, error)
- func (to *Session) GetServerDetailsByHostName(hostName string) ([]tc.ServerDetailV11, ReqInf, error)
- func (to *Session) GetServerFQDN(n string) (string, ReqInf, error)
- func (to *Session) GetServerIDDeliveryServices(server int) ([]tc.DeliveryServiceNullable, ReqInf, error)
- func (to *Session) GetServerServerCapabilities(serverID *int, serverHostName, serverCapability *string) ([]tc.ServerServerCapability, ReqInf, error)
- func (to *Session) GetServerStatusCounts(typeName *string) (map[string]int, ReqInf, error)
- func (to *Session) GetServerUpdateStatus(hostName string) (tc.ServerUpdateStatus, ReqInf, error)
- func (to *Session) GetServers() ([]tc.ServerV1, ReqInf, error)
- func (to *Session) GetServersByType(qparams url.Values) ([]tc.ServerV1, ReqInf, error)
- func (to *Session) GetServersChecks() ([]tc.GenericServerCheck, tc.Alerts, ReqInf, error)
- func (to *Session) GetServersShortNameSearch(shortname string) ([]string, ReqInf, error)
- func (to *Session) GetStaticDNSEntries() ([]tc.StaticDNSEntry, ReqInf, error)
- func (to *Session) GetStaticDNSEntriesByHost(host string) ([]tc.StaticDNSEntry, ReqInf, error)
- func (to *Session) GetStaticDNSEntryByID(id int) ([]tc.StaticDNSEntry, ReqInf, error)
- func (to *Session) GetStatusByID(id int) ([]tc.Status, ReqInf, error)
- func (to *Session) GetStatusByName(name string) ([]tc.Status, ReqInf, error)
- func (to *Session) GetStatuses() ([]tc.Status, ReqInf, error)
- func (to *Session) GetSteeringTargets(dsID int) ([]tc.SteeringTargetNullable, ReqInf, error)
- func (to *Session) GetSummaryStats(cdn, deliveryService, statName *string) (tc.StatsSummaryResponse, ReqInf, error)
- func (to *Session) GetSummaryStatsLastUpdated(statName *string) (tc.StatsSummaryLastUpdatedResponse, ReqInf, error)
- func (to *Session) GetTOExtensions() (tc.TOExtensionResponse, ReqInf, error)
- func (to *Session) GetTrafficMonitorConfig(cdn string) (*tc.LegacyTrafficMonitorConfig, ReqInf, error)
- func (to *Session) GetTrafficMonitorConfigMap(cdn string) (*tc.LegacyTrafficMonitorConfigMap, ReqInf, error)
- func (to *Session) GetTypeByID(id int) ([]tc.Type, ReqInf, error)
- func (to *Session) GetTypeByName(name string) ([]tc.Type, ReqInf, error)
- func (to *Session) GetTypes(useInTable ...string) ([]tc.Type, ReqInf, error)
- func (to *Session) GetUpdate(serverName string) (Update, ReqInf, error)
- func (to *Session) GetUserByID(id int) ([]tc.User, ReqInf, error)
- func (to *Session) GetUserByUsername(username string) ([]tc.User, ReqInf, error)
- func (to *Session) GetUserCurrent() (*tc.UserCurrent, ReqInf, error)
- func (to *Session) GetUserDeliveryServices(userID int) (*tc.UserDeliveryServicesNullableResponse, ReqInf, error)
- func (to *Session) GetUsers() ([]tc.User, ReqInf, error)
- func (to *Session) GetUsersByRole(roleName string) ([]tc.User, ReqInf, error)
- func (to *Session) ImportProfile(importRequest *tc.ProfileImportRequest) (*tc.ProfileImportResponse, ReqInf, error)
- func (to *Session) InsertServerCheckStatus(status tc.ServercheckRequestNullable) (*tc.ServercheckPostResponse, ReqInf, error)
- func (to *Session) Ping() (map[string]string, ReqInf, error)
- func (to *Session) RawRequest(method, path string, body []byte) (*http.Response, net.Addr, error)
- func (to *Session) RegisterNewUser(tenantID uint, roleID uint, email rfc.EmailAddress) (tc.Alerts, ReqInf, error)
- func (to *Session) ReplaceFederationResolverMappingsForCurrentUser(mappings tc.DeliveryServiceFederationResolverMappingRequest) (tc.Alerts, ReqInf, error)
- func (to *Session) SetCachegroupDeliveryServices(cgID int, dsIDs []int) (tc.CacheGroupPostDSRespResponse, ReqInf, error)
- func (to *Session) SetDeliveryServiceUser(userID int, dses []int, replace bool) (*tc.UserDeliveryServicePostResponse, error)
- func (to *Session) SetServerQueueUpdate(serverID int, queueUpdate bool) (tc.ServerQueueUpdateResponse, ReqInf, error)
- func (to *Session) SetUpdate(serverName string, updatePending int, revalPending int) (ReqInf, error)
- func (to *Session) SnapshotCRConfig(cdn string) (ReqInf, error)
- func (to *Session) SnapshotCRConfigByID(id int) (tc.Alerts, ReqInf, error)
- func (to *Session) Steering() ([]tc.Steering, ReqInf, error)
- func (to *Session) Tenant(id string) (*tc.Tenant, ReqInf, error)
- func (to *Session) TenantByName(name string) (*tc.Tenant, ReqInf, error)
- func (to *Session) Tenants() ([]tc.Tenant, ReqInf, error)
- func (to *Session) UpdateASNByID(id int, entity tc.ASN) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateCDNByID(id int, cdn tc.CDN) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateCDNFederationsByID(f tc.CDNFederation, CDNName string, ID int) (*tc.UpdateCDNFederationResponse, ReqInf, error)
- func (to *Session) UpdateCacheGroupNullableByID(id int, cachegroup tc.CacheGroupNullable) (*tc.CacheGroupDetailResponse, ReqInf, error)
- func (to *Session) UpdateCoordinateByID(id int, coordinate tc.Coordinate) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateCurrentUser(u tc.User) (*tc.UpdateUserResponse, ReqInf, error)
- func (to *Session) UpdateDeliveryService(id string, ds *tc.DeliveryService) (*tc.UpdateDeliveryServiceResponse, error)
- func (to *Session) UpdateDeliveryServiceNullable(id string, ds *tc.DeliveryServiceNullable) (*tc.UpdateDeliveryServiceResponse, error)
- func (to *Session) UpdateDeliveryServiceRequestByID(id int, dsr tc.DeliveryServiceRequest) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateDeliveryServiceRequestCommentByID(id int, comment tc.DeliveryServiceRequestComment) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateDeliveryServiceSafe(id int, ds tc.DeliveryServiceSafeUpdateRequest) ([]tc.DeliveryServiceNullable, ReqInf, error)
- func (to *Session) UpdateDivisionByID(id int, division tc.Division) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateOriginByID(id int, origin tc.Origin) (*tc.OriginDetailResponse, ReqInf, error)
- func (to *Session) UpdateParameterByID(id int, pl tc.Parameter) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdatePhysLocationByID(id int, pl tc.PhysLocation) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateProfileByID(id int, pl tc.Profile) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateRegionByID(id int, region tc.Region) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateRoleByID(id int, region tc.Role) (tc.Alerts, ReqInf, int, error)
- func (to *Session) UpdateServerByID(id int, server tc.ServerV1) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateServerStatus(serverID int, req tc.ServerPutStatus) (*tc.Alerts, ReqInf, error)
- func (to *Session) UpdateStaticDNSEntryByID(id int, sdns tc.StaticDNSEntry) (tc.Alerts, ReqInf, int, error)
- func (to *Session) UpdateStatusByID(id int, status tc.Status) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateSteeringTarget(st tc.SteeringTargetNullable) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateTenant(id string, t *tc.Tenant) (*tc.TenantResponse, error)
- func (to *Session) UpdateTypeByID(id int, typ tc.Type) (tc.Alerts, ReqInf, error)
- func (to *Session) UpdateUserByID(id int, u *tc.User) (*tc.UpdateUserResponse, ReqInf, error)
- func (to *Session) Users() ([]tc.User, error)
- type Update
- type UpdateResponse
Constants ¶
const ( API_v13_Profile_Parameters = "/api/1.3/profileparameters" ProfileIdQueryParam = "profileId" ParameterIdQueryParam = "parameterId" )
const ( API_v13_Servers = "/api/1.3/servers" API_SERVERS_DETAILS = apiBase + "/servers/details" API_v14_Server_Assign_DeliveryServices = "/api/1.4/servers/%d/deliveryservices?replace=%t" API_v14_Server_DeliveryServices = "/api/1.4/servers/%d/deliveryservices" )
const (
APIServerCapabilities = apiBase + "/server_capabilities"
)
const APIServersStatus = apiBase + "/servers/status"
const (
API_DS_REQUESTS = "/api/1.3/deliveryservice_requests"
)
const API_TO_EXTENSION = apiBase + "/to_extensions"
const (
API_V13_Coordinates = "/api/1.3/coordinates"
)
const API_V13_SERVERCHECK = "/api/1.3/servercheck"
const API_V1_SERVERCHECK_GET = apiBase + "/servers/checks"
const (
API_v11_OSVERSIONS = "/api/1.1/osversions"
)
const (
API_v13_ABOUT = "/api/1.3/about"
)
const (
API_v13_CDNs = "/api/1.3/cdns"
)
const (
API_v13_CacheGroups = "/api/1.3/cachegroups"
)
const (
API_v13_DeliveryServiceRequestComments = "/api/1.3/deliveryservice_request_comments"
)
const (
API_v13_Divisions = "/api/1.3/divisions"
)
const (
API_v13_Origins = "/api/1.3/origins"
)
const (
API_v13_PING = "/api/1.3/ping"
)
const (
API_v13_Parameters = "/api/1.3/parameters"
)
const (
API_v13_PhysLocations = "/api/1.3/phys_locations"
)
const (
API_v13_REGIONS = "/api/1.3/regions"
)
const (
API_v13_STATUSES = "/api/1.3/statuses"
)
const (
API_v13_StaticDNSEntries = "/api/1.3/staticdnsentries"
)
const (
API_v13_Types = "/api/1.3/types"
)
const API_v14_CAPABILITIES = "/api/1.4/capabilities"
const (
API_v14_ROLES = "/api/1.4/roles"
)
const (
API_v14_Server_Server_Capabilities = apiBase + "/server_server_capabilities"
)
const (
API_v1_CacheGroupParameters = apiBase + "/cachegroupparameters"
)
const (
API_v1_Logs = apiBase + "/logs"
)
const (
API_v2_ASNs = "/api/1.3/asns"
)
const CacheHitStatusExpired = CacheHitStatus("expired")
const CacheHitStatusHit = CacheHitStatus("hit")
const CacheHitStatusInvalid = CacheHitStatus("")
const CacheHitStatusMiss = CacheHitStatus("miss")
const DefaultTimeout = time.Second * time.Duration(30)
const UpdateStatusClear = 0
UpdateStatusClear is the value received by and posted to the Traffic Ops cache update endpoint, indicating no updates are pending for a cache.
const UpdateStatusPending = 1
UpdateStatusPending is the value received by and posted to the Traffic Ops cache update endpoint, indicating an update is pending for a cache. That is, someone has clicked "Queue Updates" in Traffic Ops, and the cache has yet to run ORT, which will fetch updates and clear the update pending flag.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheEntry ¶
CacheEntry ...
type CacheHitStatus ¶
type CacheHitStatus string
func StringToCacheHitStatus ¶
func StringToCacheHitStatus(s string) CacheHitStatus
func (CacheHitStatus) String ¶
func (s CacheHitStatus) String() string
type OuterResponse ¶
type OuterResponse struct {
Response json.RawMessage `json:"response"`
}
type ReqInf ¶
type ReqInf struct { CacheHitStatus CacheHitStatus RemoteAddr net.Addr }
type Session ¶
type Session struct { UserName string Password string URL string Client *http.Client UserAgentStr string // contains filtered or unexported fields }
Session ...
func LoginWithAgent ¶
func LoginWithAgent(toURL string, toUser string, toPasswd string, insecure bool, userAgent string, useCache bool, requestTimeout time.Duration) (*Session, net.Addr, error)
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. Returns the logged in client, the remote address of Traffic Ops which was translated and used to log in, and any error. If the error is not nil, the remote address may or may not be nil, depending whether the error occurred before the login request.
func LoginWithToken ¶
func LogoutWithAgent ¶
func LogoutWithAgent(toURL string, toUser string, toPasswd string, insecure bool, userAgent string, useCache bool, requestTimeout time.Duration) (*Session, net.Addr, error)
Logout of traffic_ops
func NewNoAuthSession ¶
func NewNoAuthSession(toURL string, insecure bool, userAgent string, useCache bool, requestTimeout time.Duration) *Session
NewNoAuthSession returns a new Session without logging in this can be used for querying unauthenticated endpoints without requiring a login
func NewSession ¶
func (*Session) AddFederationResolverMappingsForCurrentUser ¶
func (to *Session) AddFederationResolverMappingsForCurrentUser(mappings tc.DeliveryServiceFederationResolverMappingRequest) (tc.Alerts, ReqInf, error)
AddFederationResolverMappingsForCurrentUser adds Federation Resolver mappings to one or more Delivery Services for the current user.
func (*Session) AllFederations ¶
func (*Session) AllFederationsForCDN ¶
func (*Session) AssignDeliveryServiceIDsToServerID ¶
func (to *Session) AssignDeliveryServiceIDsToServerID(server int, dsIDs []int, replace bool) (tc.Alerts, ReqInf, error)
AssignDeliveryServiceIDsToServerID assigns a set of Delivery Services to a single server, optionally replacing any and all existing assignments. 'server' should be the requested server's ID, 'dsIDs' should be a slice of the requested Delivery Services' IDs. If 'replace' is 'true', existing assignments to the server will be replaced.
func (*Session) AssignFederationFederationResolver ¶
func (to *Session) AssignFederationFederationResolver(fedID int, resolverIDs []int, replace bool) (tc.AssignFederationFederationResolversResponse, ReqInf, error)
AssignFederationFederationResolver creates the Federation Resolver 'fr'.
func (*Session) CopyProfile ¶
CopyProfile creates a new profile from an existing profile.
func (*Session) CreateCDNFederationByName ¶
func (*Session) CreateCacheGroupNullable ¶
func (to *Session) CreateCacheGroupNullable(cachegroup tc.CacheGroupNullable) (*tc.CacheGroupDetailResponse, ReqInf, error)
Create a CacheGroup
func (*Session) CreateCacheGroupParameter ¶
func (to *Session) CreateCacheGroupParameter(cacheGroupID, parameterID int) (*tc.CacheGroupParametersPostResponse, ReqInf, error)
CreateCacheGroupParameter Associates a Parameter with a Cache Group
func (*Session) CreateCapability ¶
CreateCapability creates the passed capability.
func (*Session) CreateCoordinate ¶
Create a Coordinate
func (*Session) CreateDeliveryService ¶
func (to *Session) CreateDeliveryService(ds *tc.DeliveryService) (*tc.CreateDeliveryServiceResponse, error)
CreateDeliveryService creates the DeliveryService it's passed
func (*Session) CreateDeliveryServiceNullable ¶
func (to *Session) CreateDeliveryServiceNullable(ds *tc.DeliveryServiceNullable) (*tc.CreateDeliveryServiceNullableResponse, error)
CreateDeliveryServiceNullable creates the DeliveryService it's passed
func (*Session) CreateDeliveryServiceRequest ¶
func (to *Session) CreateDeliveryServiceRequest(dsr tc.DeliveryServiceRequest) (tc.Alerts, ReqInf, error)
Create a Delivery Service Request
func (*Session) CreateDeliveryServiceRequestComment ¶
func (to *Session) CreateDeliveryServiceRequestComment(comment tc.DeliveryServiceRequestComment) (tc.Alerts, ReqInf, error)
Create a delivery service request comment
func (*Session) CreateDeliveryServiceServers ¶
func (to *Session) CreateDeliveryServiceServers(dsID int, serverIDs []int, replace bool) (*tc.DSServerIDs, error)
CreateDeliveryServiceServers associates the given servers with the given delivery services. If replace is true, it deletes any existing associations for the given delivery service.
func (*Session) CreateDeliveryServicesRequiredCapability ¶
func (to *Session) CreateDeliveryServicesRequiredCapability(capability tc.DeliveryServicesRequiredCapability) (tc.Alerts, ReqInf, error)
CreateDeliveryServicesRequiredCapability assigns a Required Capability to a Delivery Service
func (*Session) CreateDivision ¶
Create a Division
func (*Session) CreateFederationDeliveryServices ¶
func (*Session) CreateFederationResolver ¶
CreateFederationResolver creates the Federation Resolver 'fr'.
func (*Session) CreateFederationUsers ¶
func (to *Session) CreateFederationUsers(federationID int, userIDs []int, replace bool) (tc.Alerts, ReqInf, error)
GetFederationUsers Associates the given Users' IDs to a Federation
func (*Session) CreateInvalidationJob ¶
Creates a new Content Invalidation Job
func (*Session) CreateMultipleParameters ¶
CreateMultipleParameters performs a POST to create multiple Parameters at once.
func (*Session) CreateMultipleProfileParameters ¶
func (to *Session) CreateMultipleProfileParameters(pps []tc.ProfileParameter) (tc.Alerts, ReqInf, error)
CreateMultipleProfileParameters creates multiple ProfileParameters at once.
func (*Session) CreateOrigin ¶
Create an Origin
func (*Session) CreateParameter ¶
Create a Parameter
func (*Session) CreatePhysLocation ¶
Create a PhysLocation
func (*Session) CreateProfile ¶
CreateProfile creates a Profile
func (*Session) CreateProfileParameter ¶
Create a ProfileParameter
func (*Session) CreateRegion ¶
Create a Region
func (*Session) CreateRole ¶
Create a Role
func (*Session) CreateServer ¶
Create a Server
func (*Session) CreateServerCapability ¶
func (to *Session) CreateServerCapability(sc tc.ServerCapability) (*tc.ServerCapabilityDetailResponse, ReqInf, error)
CreateServerCapability creates a server capability and returns the response.
func (*Session) CreateServerServerCapability ¶
func (to *Session) CreateServerServerCapability(ssc tc.ServerServerCapability) (tc.Alerts, ReqInf, error)
CreateServerServerCapability assigns a Server Capability to a Server
func (*Session) CreateStaticDNSEntry ¶
Create a StaticDNSEntry
func (*Session) CreateStatus ¶
Create a Status
func (*Session) CreateStatusNullable ¶
func (*Session) CreateSteeringTarget ¶
func (*Session) CreateSummaryStats ¶
CreateSummaryStats creates a stats summary
func (*Session) CreateTOExtension ¶
CreateTOExtension creates a to_extension
func (*Session) CreateTenant ¶
CreateTenant creates the Tenant it's passed
func (*Session) CreateType ¶
Create a Type
func (*Session) CreateUser ¶
CreateUser creates a user
func (*Session) DeleteASNByASN ¶
DELETE an ASN by asn number
func (*Session) DeleteCDNByID ¶
DELETE a CDN by ID
func (*Session) DeleteCDNFederationByID ¶
func (*Session) DeleteCacheGroupByID ¶
DELETE a CacheGroup by ID
func (*Session) DeleteCacheGroupParameter ¶
func (to *Session) DeleteCacheGroupParameter(cacheGroupID, parameterID int) (tc.Alerts, ReqInf, error)
DeleteCacheGroupParameter Deassociates a Parameter with a Cache Group
func (*Session) DeleteCoordinateByID ¶
DELETE a Coordinate by ID
func (*Session) DeleteDeliveryService ¶
DeleteDeliveryService deletes the DeliveryService matching the ID it's passed
func (*Session) DeleteDeliveryServiceRequestByID ¶
DELETE a DeliveryServiceRequest by DeliveryServiceRequest assignee
func (*Session) DeleteDeliveryServiceRequestCommentByID ¶
DELETE a delivery service request comment by ID
func (*Session) DeleteDeliveryServiceServer ¶
func (*Session) DeleteDeliveryServiceUser ¶
func (to *Session) DeleteDeliveryServiceUser(userID int, dsID int) (*tc.UserDeliveryServiceDeleteResponse, error)
DeleteDeliveryServiceUser deletes the association between the given delivery service and user
func (*Session) DeleteDeliveryServicesRequiredCapability ¶
func (to *Session) DeleteDeliveryServicesRequiredCapability(deliveryserviceID int, capability string) (tc.Alerts, ReqInf, error)
DeleteDeliveryServicesRequiredCapability unassigns a Required Capability from a Delivery Service
func (*Session) DeleteDivisionByID ¶
DELETE a Division by Division id
func (*Session) DeleteFederationDeliveryService ¶
func (to *Session) DeleteFederationDeliveryService(federationID, deliveryServiceID int) (tc.Alerts, ReqInf, error)
DeleteFederationDeliveryService Deletes a given Delivery Service from a Federation
func (*Session) DeleteFederationResolver ¶
DeleteFederationResolver deletes the Federation Resolver identified by 'id'.
func (*Session) DeleteFederationResolverMappingsForCurrentUser ¶
DeleteFederationResolverMappingsForCurrentUser removes ALL Federation Resolver mappings for ALL Federations assigned to the currently authenticated user, as well as deleting ALL of the Federation Resolvers themselves.
func (*Session) DeleteFederationUser ¶
DeleteFederationUser Deletes a given User from a Federation
func (*Session) DeleteOriginByID ¶
DELETE an Origin by ID
func (*Session) DeleteParameterByID ¶
DELETE a Parameter by ID
func (*Session) DeleteParameterByProfileParameter ¶
func (to *Session) DeleteParameterByProfileParameter(profile int, parameter int) (tc.Alerts, ReqInf, error)
DELETE a Parameter by Parameter
func (*Session) DeletePhysLocationByID ¶
DELETE a PhysLocation by ID
func (*Session) DeleteProfileByID ¶
DeleteProfileByID DELETEs a Profile by ID
func (*Session) DeleteRegion ¶
DeleteRegion lets you DELETE a Region. Only 1 parameter is required, not both.
func (*Session) DeleteRegionByID ¶
DELETE a Region by ID
func (*Session) DeleteRoleByID ¶
DELETE a Role by ID
func (*Session) DeleteServerByID ¶
DELETE a Server by ID
func (*Session) DeleteServerCapability ¶
DeleteServerCapability deletes the given server capability by name.
func (*Session) DeleteServerServerCapability ¶
func (to *Session) DeleteServerServerCapability(serverID int, serverCapability string) (tc.Alerts, ReqInf, error)
DeleteServerServerCapability unassigns a Server Capability from a Server
func (*Session) DeleteStaticDNSEntryByID ¶
DELETE a StaticDNSEntry by ID
func (*Session) DeleteStatusByID ¶
DELETE a Status by id
func (*Session) DeleteSteeringTarget ¶
func (*Session) DeleteTOExtension ¶
DeleteToExtension deletes a to_extension
func (*Session) DeleteTenant ¶
func (to *Session) DeleteTenant(id string) (*tc.DeleteTenantResponse, error)
DeleteTenant deletes the Tenant matching the ID it's passed
func (*Session) DeleteTypeByID ¶
DELETE a Type by ID
func (*Session) DeleteUserByID ¶
DeleteUserByID updates user with the given id
func (*Session) ErrUnlessOK ¶
func (to *Session) ErrUnlessOK(resp *http.Response, remoteAddr net.Addr, err error, path string) (*http.Response, net.Addr, error)
ErrUnlessOk returns nil and an error if the given Response's status code is anything but 200 OK. This includes reading the Response.Body and Closing it. Otherwise, the given response and error are returned unchanged.
func (*Session) ExportProfile ¶
ExportProfile Returns an exported Profile
func (*Session) Federations ¶
func (*Session) GetAPICapabilities ¶
func (to *Session) GetAPICapabilities(capability string, order string) (tc.APICapabilityResponse, ReqInf, error)
GetAPICapabilities will retrieve API Capabilities. In the event that no capability parameter is supplied, it will return all existing. If a capability is supplied, it will return only those with an exact match. Order may be specified to change the default sort order.
func (*Session) GetASNByASN ¶
GET an ASN by the asn number
func (*Session) GetASNByID ¶
GET a ASN by the id
func (*Session) GetATSCDNConfig ¶
func (*Session) GetATSCDNConfigByName ¶
func (*Session) GetATSProfileConfig ¶
func (*Session) GetATSProfileConfigByName ¶
func (*Session) GetATSServerConfig ¶
func (*Session) GetATSServerConfigByName ¶
func (*Session) GetATSServerConfigList ¶
func (*Session) GetATSServerConfigListByName ¶
func (*Session) GetAllCacheGroupParameters ¶
func (to *Session) GetAllCacheGroupParameters() ([]tc.CacheGroupParametersResponseNullable, ReqInf, error)
GetAllCacheGroupParameters Gets all Cachegroup Parameter associations
func (*Session) GetCDNByID ¶
GET a CDN by the CDN ID
func (*Session) GetCDNByName ¶
GET a CDN by the CDN name
func (*Session) GetCDNFederationsByID ¶
func (*Session) GetCDNFederationsByName ¶
func (*Session) GetCDNSSLKeys ¶
func (*Session) GetCRConfig ¶
GetCRConfig returns the raw JSON bytes of the CRConfig from Traffic Ops, and whether the bytes were from the client's internal cache.
func (*Session) GetCRConfigNew ¶
GetCRConfigNew returns the raw JSON bytes of the CRConfig from Traffic Ops, and whether the bytes were from the client's internal cache.
func (*Session) GetCacheGroupNullableByID ¶
GET a CacheGroup by the CacheGroup id
func (*Session) GetCacheGroupNullableByName ¶
func (to *Session) GetCacheGroupNullableByName(name string) ([]tc.CacheGroupNullable, ReqInf, error)
GET a CacheGroup by the CacheGroup name
func (*Session) GetCacheGroupParameters ¶
func (to *Session) GetCacheGroupParameters(cacheGroupID int) ([]tc.CacheGroupParameter, ReqInf, error)
GetCacheGroupParameters Gets a Cache Group's Parameters
func (*Session) GetCacheGroupParametersByQueryParams ¶
func (to *Session) GetCacheGroupParametersByQueryParams(cacheGroupID int, queryParams string) ([]tc.CacheGroupParameter, ReqInf, error)
GetCacheGroupParametersByQueryParams Gets a Cache Group's Parameters with query parameters
func (*Session) GetCacheGroupUnassignedParameters ¶
func (to *Session) GetCacheGroupUnassignedParameters(cacheGroupID int) ([]tc.CacheGroupParameter, ReqInf, error)
GetCacheGroupUnassignedParameters Gets a Cache Group's Unassigned Parameters
func (*Session) GetCacheGroupUnassignedParametersByQueryParams ¶
func (to *Session) GetCacheGroupUnassignedParametersByQueryParams(cacheGroupID int, queryParams string) ([]tc.CacheGroupParameter, ReqInf, error)
GetCacheGroupParametersByQueryParams Gets a Cache Group's Unassigned Parameters with query parameters
func (*Session) GetCacheGroupsNullable ¶
Returns a list of CacheGroups
func (*Session) GetCapabilities ¶
GetCapabilities retrieves all capabilities.
func (*Session) GetCapability ¶
GetCapability retrieves only the capability named 'c'
func (*Session) GetCoordinateByID ¶
GET a Coordinate by the Coordinate id
func (*Session) GetCoordinateByName ¶
GET a Coordinate by the Coordinate name
func (*Session) GetCoordinates ¶
Returns a list of Coordinates
func (*Session) GetCurrentStats ¶
GetCurrentStats gets current stats for each CDNs and a total across them
func (*Session) GetDeliveryService ¶
func (*Session) GetDeliveryServiceByXMLIDNullable ¶
func (*Session) GetDeliveryServiceCapacity ¶
func (*Session) GetDeliveryServiceHealth ¶
func (*Session) GetDeliveryServiceMatches ¶
func (*Session) GetDeliveryServiceNullable ¶
func (*Session) GetDeliveryServiceRegexes ¶
func (*Session) GetDeliveryServiceRequestByID ¶
func (to *Session) GetDeliveryServiceRequestByID(id int) ([]tc.DeliveryServiceRequest, ReqInf, error)
GET a DeliveryServiceRequest by the DeliveryServiceRequest id
func (*Session) GetDeliveryServiceRequestByXMLID ¶
func (to *Session) GetDeliveryServiceRequestByXMLID(XMLID string) ([]tc.DeliveryServiceRequest, ReqInf, error)
GET a DeliveryServiceRequest by the DeliveryServiceRequest XMLID
func (*Session) GetDeliveryServiceRequestCommentByID ¶
func (to *Session) GetDeliveryServiceRequestCommentByID(id int) ([]tc.DeliveryServiceRequestComment, ReqInf, error)
GET a delivery service request comment by ID
func (*Session) GetDeliveryServiceRequestComments ¶
func (to *Session) GetDeliveryServiceRequestComments() ([]tc.DeliveryServiceRequestComment, ReqInf, error)
Returns a list of delivery service request comments
func (*Session) GetDeliveryServiceRequests ¶
GetDeliveryServiceRequests retrieves all deliveryservices available to session user.
func (*Session) GetDeliveryServiceRouting ¶
func (*Session) GetDeliveryServiceSSLKeysByHostname ¶
func (*Session) GetDeliveryServiceSSLKeysByID ¶
func (*Session) GetDeliveryServiceServer ¶
func (*Session) GetDeliveryServiceServers ¶
GetDeliveryServiceServers gets all delivery service servers, with the default API limit.
func (*Session) GetDeliveryServiceServersN ¶
func (to *Session) GetDeliveryServiceServersN(n int) (tc.DeliveryServiceServerResponse, ReqInf, error)
GetDeliveryServiceServersN gets all delivery service servers, with a limit of n.
func (*Session) GetDeliveryServiceServersWithLimits ¶
func (to *Session) GetDeliveryServiceServersWithLimits(limit int, deliveryServiceIDs []int, serverIDs []int) (tc.DeliveryServiceServerResponse, ReqInf, error)
GetDeliveryServiceServersWithLimits gets all delivery service servers, allowing specifying the limit of mappings to return, the delivery services to return, and the servers to return. The limit may be 0, in which case the default limit will be applied. The deliveryServiceIDs and serverIDs may be nil or empty, in which case all delivery services and/or servers will be returned.
func (*Session) GetDeliveryServiceState ¶
func (*Session) GetDeliveryServiceURISigningKeys ¶
func (*Session) GetDeliveryServiceURLSigKeys ¶
func (*Session) GetDeliveryServices ¶
func (*Session) GetDeliveryServicesByCDNID ¶
func (*Session) GetDeliveryServicesByServer ¶
func (*Session) GetDeliveryServicesEligible ¶
func (*Session) GetDeliveryServicesNullable ¶
func (*Session) GetDeliveryServicesRequiredCapabilities ¶
func (to *Session) GetDeliveryServicesRequiredCapabilities(deliveryServiceID *int, xmlID, capability *string) ([]tc.DeliveryServicesRequiredCapability, ReqInf, error)
GetDeliveryServicesRequiredCapabilities retrieves a list of Required Capabilities that are assigned to a Delivery Service Callers can filter the results by delivery service id, xml id and/or required capability via the optional parameters
func (*Session) GetDivisionByID ¶
GET a Division by the Division id
func (*Session) GetDivisionByName ¶
GET a Division by the Division name
func (*Session) GetDivisions ¶
Returns a list of Divisions
func (*Session) GetDomains ¶
func (*Session) GetFederationDeliveryServices ¶
func (to *Session) GetFederationDeliveryServices(federationID int) ([]tc.FederationDeliveryServiceNullable, ReqInf, error)
GetFederationDeliveryServices Returns a given Federation's Delivery Services
func (*Session) GetFederationFederationResolversByID ¶
func (to *Session) GetFederationFederationResolversByID(id int) (tc.FederationFederationResolversResponse, ReqInf, error)
GetFederationFederationResolversByID retrieves all Federation Resolvers belonging to Federation of ID.
func (*Session) GetFederationResolverByID ¶
GetFederationResolverByID retrieves a single Federation Resolver identified by ID.
func (*Session) GetFederationResolverByIPAddress ¶
func (to *Session) GetFederationResolverByIPAddress(ip string) (tc.FederationResolver, ReqInf, error)
GetFederationResolverByIPAddress retrieves the Federation Resolver that uses the IP address or CIDR-notation subnet 'ip'.
func (*Session) GetFederationResolvers ¶
GetFederationResolvers retrieves all Federation Resolvers from Traffic Ops
func (*Session) GetFederationResolversByType ¶
GetFederationResolversByType gets all Federation Resolvers that are of the Type named 't'.
func (*Session) GetFederationUsers ¶
GetFederationUsers Returns a given Federation's Users
func (*Session) GetInvalidationJobs ¶
func (to *Session) GetInvalidationJobs(ds *interface{}, user *interface{}) ([]tc.InvalidationJob, ReqInf, error)
Returns a list of Content Invalidation Jobs visible to your Tenant, filtered according to ds and user
Either or both of ds and user may be nil, but when they are not they cause filtering of the returned jobs by Delivery Service and Traffic Ops user, respectively.
ds may be a uint, int, or float64 indicating the integral, unique identifier of the desired Delivery Service (in the case of a float64 the fractional part is dropped, e.g. 3.45 -> 3), or it may be a string, in which case it should be the xml_id of the desired Delivery Service, or it may be an actual tc.DeliveryService or tc.DeliveryServiceNullable structure.
Likewise, user may be a uint, int or float64 indicating the integral, unique identifier of the desired user (in the case of a float64 the fractional part is dropped, e.g. 3.45 -> 3), or it may be a string, in which case it should be the username of the desired user, or it may be an actual tc.User or tc.UserCurrent structure.
func (*Session) GetJobs ¶
GetJobs returns a list of Jobs. If deliveryServiceID or userID are not nil, only jobs for that delivery service or belonging to that user are returned. Both deliveryServiceID and userID may be nil.
Deprecated, use GetInvalidationJobs instead
func (*Session) GetLogsByDays ¶
GetLogsByDays gets a list of logs limited to a certain number of days.
func (*Session) GetLogsByLimit ¶
GetLogsByLimit gets a list of logs limited to a certain number of logs.
func (*Session) GetLogsByQueryParams ¶
GetLogsByQueryParams gets a list of logs filtered by query params.
func (*Session) GetOSVersions ¶
GetOSVersions GET all available Operating System (OS) versions for ISO generation, as well as the name of the directory where the "kickstarter" files are found. Structure of returned map:
key: Name of OS value: Directory where the ISO source can be found
func (*Session) GetOriginByID ¶
GET an Origin by the Origin ID
func (*Session) GetOriginByName ¶
GET an Origin by the Origin name
func (*Session) GetOrigins ¶
Returns a list of Origins
func (*Session) GetOriginsByDeliveryServiceID ¶
GET a list of Origins by Delivery Service ID
func (*Session) GetOriginsByQueryParams ¶
GET a list of Origins by a query parameter string
func (*Session) GetParameterByConfigFile ¶
GET a Parameter by the Parameter ConfigFile
func (*Session) GetParameterByID ¶
GET a Parameter by the Parameter ID
func (*Session) GetParameterByName ¶
GET a Parameter by the Parameter name
func (*Session) GetParameterByNameAndConfigFile ¶
func (to *Session) GetParameterByNameAndConfigFile(name string, configFile string) ([]tc.Parameter, ReqInf, error)
GET a Parameter by the Parameter Name and ConfigFile
func (*Session) GetParameterByNameAndConfigFileAndValue ¶
func (to *Session) GetParameterByNameAndConfigFileAndValue(name, configFile, value string) ([]tc.Parameter, ReqInf, error)
GET a Parameter by the Parameter Name and ConfigFile and Value TODO: API should support all 3, but does not support filter by value currently. Until then, loop thru hits until you find one with that value
func (*Session) GetParameters ¶
Returns a list of Parameters
func (*Session) GetParametersByProfileName ¶
func (*Session) GetPhysLocationByID ¶
GET a PhysLocation by the PhysLocation ID
func (*Session) GetPhysLocationByName ¶
GET a PhysLocation by the PhysLocation name
func (*Session) GetPhysLocations ¶
Returns a list of PhysLocations
func (*Session) GetProfileByCDNID ¶
GetProfileByCDNID GETs a Profile by the Profile cdn id
func (*Session) GetProfileByID ¶
GetProfileByID GET a Profile by the Profile ID
func (*Session) GetProfileByName ¶
GetProfileByName GET a Profile by the Profile name
func (*Session) GetProfileByParameter ¶
GetProfileByParameter GETs a Profile by the Profile "param"
func (*Session) GetProfileParameterByQueryParams ¶
func (to *Session) GetProfileParameterByQueryParams(queryParams string) ([]tc.ProfileParameter, ReqInf, error)
GET a Profile Parameter by the Parameter
func (*Session) GetProfileParameters ¶
Returns a list of Profile Parameters
func (*Session) GetProfiles ¶
GetProfiles returns a list of Profiles
func (*Session) GetRegionByID ¶
GET a Region by the Region id
func (*Session) GetRegionByName ¶
GET a Region by the Region name
func (*Session) GetRegionByNamePath ¶
GetRegionByNamePath gets a region by name, using the /api/version/region/name path. This gets the same data as GetRegionByName, but uses a different API path to get the same data, and returns a slightly different format.
func (*Session) GetRegions ¶
Returns a list of regions
func (*Session) GetRoleByID ¶
GET a Role by the Role id
func (*Session) GetRoleByName ¶
GET a Role by the Role name
func (*Session) GetRoleByQueryParams ¶
func (to *Session) GetRoleByQueryParams(queryParams map[string]string) ([]tc.Role, ReqInf, int, error)
GetRoleByQueryParams gets a Role by the Role query parameters
func (*Session) GetServerByHostName ¶
GET a Server by the Server hostname
func (*Session) GetServerByID ¶
GET a Server by the Server ID
func (*Session) GetServerCapabilities ¶
GetServerCapabilities returns all the server capabilities.
func (*Session) GetServerCapability ¶
GetServerCapability returns the given server capability by name.
func (*Session) GetServerDetailsByHostName ¶
func (to *Session) GetServerDetailsByHostName(hostName string) ([]tc.ServerDetailV11, ReqInf, error)
GetServerDetailsByHostName GETs Servers by the Server hostname.
func (*Session) GetServerIDDeliveryServices ¶
func (*Session) GetServerServerCapabilities ¶
func (to *Session) GetServerServerCapabilities(serverID *int, serverHostName, serverCapability *string) ([]tc.ServerServerCapability, ReqInf, error)
GetServerServerCapabilities retrieves a list of Server Capabilities that are assigned to a Server Callers can filter the results by server id, server host name and/or server capability via the optional parameters
func (*Session) GetServerStatusCounts ¶
GetServerStatusCounts gets the counts of each server status in Traffic Ops. If typeName is non-nil, only statuses of the given server type name will be counted.
func (*Session) GetServerUpdateStatus ¶
GetServerUpdateStatus GETs the Server Update Status by the Server hostname.
func (*Session) GetServers ¶
Returns a list of Servers
func (*Session) GetServersByType ¶
func (*Session) GetServersChecks ¶
GetServersChecks fetches check and meta information about servers from /servers/checks.
func (*Session) GetServersShortNameSearch ¶
func (*Session) GetStaticDNSEntries ¶
Returns a list of StaticDNSEntrys
func (*Session) GetStaticDNSEntriesByHost ¶
GET a StaticDNSEntry by the StaticDNSEntry hsot
func (*Session) GetStaticDNSEntryByID ¶
GET a StaticDNSEntry by the StaticDNSEntry ID
func (*Session) GetStatusByID ¶
GET a Status by the Status id
func (*Session) GetStatusByName ¶
GET a Status by the Status name
func (*Session) GetStatuses ¶
Returns a list of Statuses
func (*Session) GetSteeringTargets ¶
func (*Session) GetSummaryStats ¶
func (to *Session) GetSummaryStats(cdn, deliveryService, statName *string) (tc.StatsSummaryResponse, ReqInf, error)
GetSummaryStats gets a list of summary stats with the ability to filter on cdn,deliveryService and/or stat
func (*Session) GetSummaryStatsLastUpdated ¶
func (to *Session) GetSummaryStatsLastUpdated(statName *string) (tc.StatsSummaryLastUpdatedResponse, ReqInf, error)
GetSummaryStatsLastUpdated time of the last summary for a given stat
func (*Session) GetTOExtensions ¶
GetTOExtensions gets all to_extensions
func (*Session) GetTrafficMonitorConfig ¶
func (*Session) GetTrafficMonitorConfigMap ¶
func (*Session) GetTypeByID ¶
GET a Type by the Type ID
func (*Session) GetTypeByName ¶
GET a Type by the Type name
func (*Session) GetUserByUsername ¶
func (*Session) GetUserCurrent ¶
GetUserCurrent gets information about the current user
func (*Session) GetUserDeliveryServices ¶
func (to *Session) GetUserDeliveryServices(userID int) (*tc.UserDeliveryServicesNullableResponse, ReqInf, error)
GetUserDeliveryServices gets the delivery services associated with the given user.
func (*Session) GetUsersByRole ¶
GetUsersByRole returns all users accessible from current user for a given role
func (*Session) ImportProfile ¶
func (to *Session) ImportProfile(importRequest *tc.ProfileImportRequest) (*tc.ProfileImportResponse, ReqInf, error)
ImportProfile imports an exported Profile
func (*Session) InsertServerCheckStatus ¶
func (to *Session) InsertServerCheckStatus(status tc.ServercheckRequestNullable) (*tc.ServercheckPostResponse, ReqInf, error)
InsertServerCheckStatus Will insert/update the servercheck value based on if it already exists or not
func (*Session) RawRequest ¶
RawRequest performs the actual HTTP request to Traffic Ops, simply, without trying to refresh the cookie if an Unauthorized code is returned. Returns the response, the remote address of the Traffic Ops instance used, and any error. The returned net.Addr is guaranteed to be either nil or valid, even if the returned error is not nil. Callers are encouraged to check and use the net.Addr if an error is returned, and use the remote address in their own error messages. This violates the Go idiom that a non-nil error implies all other values are undefined, but it's more straightforward than alternatives like typecasting.
func (*Session) RegisterNewUser ¶
func (to *Session) RegisterNewUser(tenantID uint, roleID uint, email rfc.EmailAddress) (tc.Alerts, ReqInf, error)
RegisterNewUser requests the registration of a new user with the given tenant ID and role ID, through their email.
func (*Session) ReplaceFederationResolverMappingsForCurrentUser ¶
func (to *Session) ReplaceFederationResolverMappingsForCurrentUser(mappings tc.DeliveryServiceFederationResolverMappingRequest) (tc.Alerts, ReqInf, error)
ReplaceFederationResolverMappingsForCurrentUser replaces any and all Federation Resolver mappings on all Federations assigned to the currently authenticated user. This will first remove ALL Federation Resolver mappings for ALL Federations assigned to the currently authenticated user, as well as deleting ALL of the Federation Resolvers themselves. In other words, calling this is equivalent to a call to DeleteFederationResolverMappingsForCurrentUser followed by a call to AddFederationResolverMappingsForCurrentUser .
func (*Session) SetCachegroupDeliveryServices ¶
func (*Session) SetDeliveryServiceUser ¶
func (to *Session) SetDeliveryServiceUser(userID int, dses []int, replace bool) (*tc.UserDeliveryServicePostResponse, error)
SetUserDeliveryService associates the given delivery services with the given user.
func (*Session) SetServerQueueUpdate ¶
func (to *Session) SetServerQueueUpdate(serverID int, queueUpdate bool) (tc.ServerQueueUpdateResponse, ReqInf, error)
SetServerQueueUpdate updates a server's status and returns the response.
func (*Session) SetUpdate ¶
func (to *Session) SetUpdate(serverName string, updatePending int, revalPending int) (ReqInf, error)
SetUpdate sets the Update Pending and Reval Pending flags for the given cache server in Traffic Ops. This MUST only be called by an app (like ORT) which has fetched new config updates for the cache, generated or downloaded the config files onto the cache, and instructed the cache service to reload its config. This MUST NOT be called unless the cache is running the latest configuration in Traffic Ops, else the Traffic Ops cache update status will be wrong. If only the Reval or Update status has been updated, but not both, the old status should be queried from the update endpoint, and the original status for the unchanged value sent here.
func (*Session) SnapshotCRConfig ¶
SnapshotCRConfig snapshots a CDN by name.
func (*Session) SnapshotCRConfigByID ¶
SnapshotCDNByID snapshots a CDN by ID.
func (*Session) TenantByName ¶
TenantByName gets the Tenant for the name it's passed
func (*Session) UpdateASNByID ¶
Update a ASN by ID
func (*Session) UpdateCDNByID ¶
Update a CDN by ID
func (*Session) UpdateCDNFederationsByID ¶
func (*Session) UpdateCacheGroupNullableByID ¶
func (to *Session) UpdateCacheGroupNullableByID(id int, cachegroup tc.CacheGroupNullable) (*tc.CacheGroupDetailResponse, ReqInf, error)
Update a CacheGroup by ID
func (*Session) UpdateCoordinateByID ¶
func (to *Session) UpdateCoordinateByID(id int, coordinate tc.Coordinate) (tc.Alerts, ReqInf, error)
Update a Coordinate by ID
func (*Session) UpdateCurrentUser ¶
UpdateCurrentUser replaces the current user data with the provided tc.User structure.
func (*Session) UpdateDeliveryService ¶
func (to *Session) UpdateDeliveryService(id string, ds *tc.DeliveryService) (*tc.UpdateDeliveryServiceResponse, error)
UpdateDeliveryService updates the DeliveryService matching the ID it's passed with the DeliveryService it is passed
func (*Session) UpdateDeliveryServiceNullable ¶
func (*Session) UpdateDeliveryServiceRequestByID ¶
func (to *Session) UpdateDeliveryServiceRequestByID(id int, dsr tc.DeliveryServiceRequest) (tc.Alerts, ReqInf, error)
Update a DeliveryServiceRequest by ID
func (*Session) UpdateDeliveryServiceRequestCommentByID ¶
func (to *Session) UpdateDeliveryServiceRequestCommentByID(id int, comment tc.DeliveryServiceRequestComment) (tc.Alerts, ReqInf, error)
Update a delivery service request by ID
func (*Session) UpdateDeliveryServiceSafe ¶
func (to *Session) UpdateDeliveryServiceSafe(id int, ds tc.DeliveryServiceSafeUpdateRequest) ([]tc.DeliveryServiceNullable, ReqInf, error)
UpdateDeliveryServiceSafe updates the given Delivery Service identified by 'id' with the given "safe" fields.
func (*Session) UpdateDivisionByID ¶
Update a Division by ID
func (*Session) UpdateOriginByID ¶
func (to *Session) UpdateOriginByID(id int, origin tc.Origin) (*tc.OriginDetailResponse, ReqInf, error)
Update an Origin by ID
func (*Session) UpdateParameterByID ¶
Update a Parameter by ID
func (*Session) UpdatePhysLocationByID ¶
Update a PhysLocation by ID
func (*Session) UpdateProfileByID ¶
UpdateProfileByID updates a Profile by ID
func (*Session) UpdateRegionByID ¶
Update a Region by ID
func (*Session) UpdateRoleByID ¶
Update a Role by ID
func (*Session) UpdateServerByID ¶
Update a Server by ID
func (*Session) UpdateServerStatus ¶
func (to *Session) UpdateServerStatus(serverID int, req tc.ServerPutStatus) (*tc.Alerts, ReqInf, error)
UpdateServerStatus updates a server's status and returns the response.
func (*Session) UpdateStaticDNSEntryByID ¶
func (to *Session) UpdateStaticDNSEntryByID(id int, sdns tc.StaticDNSEntry) (tc.Alerts, ReqInf, int, error)
Update a StaticDNSEntry by ID
func (*Session) UpdateStatusByID ¶
Update a Status by ID
func (*Session) UpdateSteeringTarget ¶
func (*Session) UpdateTenant ¶
UpdateTenant updates the Tenant matching the ID it's passed with the Tenant it is passed
func (*Session) UpdateTypeByID ¶
Update a Type by ID
func (*Session) UpdateUserByID ¶
UpdateUserByID updates user with the given id
type UpdateResponse ¶
type UpdateResponse []Update
Source Files ¶
- about.go
- api_capability.go
- asn.go
- atsconfig.go
- cachegroup.go
- cachegroup_parameters.go
- capability.go
- cdn.go
- cdn_domains.go
- cdnfederations.go
- coordinate.go
- crconfig.go
- deliveryservice.go
- deliveryservice_endpoints.go
- deliveryservice_request_comments.go
- deliveryservice_requests.go
- deliveryservices_required_capabilities.go
- deliveryserviceserver.go
- division.go
- dsuser.go
- endpoints.go
- federation.go
- federation_federation_resolver.go
- federation_resolver.go
- iso.go
- job.go
- log.go
- origin.go
- parameter.go
- phys_location.go
- ping.go
- profile.go
- profile_parameter.go
- region.go
- role.go
- server.go
- server_server_capabilities.go
- server_update_status.go
- servercapability.go
- servercheck.go
- serversstatus.go
- session.go
- staticdnsentry.go
- stats_summary.go
- status.go
- steering.go
- steeringtarget.go
- tenant.go
- tenant_endpoints.go
- toextension.go
- traffic_monitor.go
- traffic_stats.go
- type.go
- update.go
- user.go
- util.go