client

package
v8.0.0-rc6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 12 Imported by: 0

README

Traffic Ops Go Client

Getting Started

  1. Obtain the latest version of the library

go get github.com/apache/trafficcontrol/v8/traffic_ops/v5-client

  1. Get a basic TO session started and fetch a list of CDNs
package main

import (
	"fmt"
	"os"
	"time"

	"github.com/apache/trafficcontrol/v8/lib/go-tc"
	toclient "github.com/apache/trafficcontrol/v8/traffic_ops/v5-client"
)

const TOURL = "http://localhost"
const TOUser = "user"
const TOPassword = "password"
const AllowInsecureConnections = true
const UserAgent = "MySampleApp"
const UseClientCache = false
const TrafficOpsRequestTimeout = time.Second * time.Duration(10)

func main() {
	session, remoteaddr, err := toclient.LoginWithAgent(
		TOURL,
		TOUser,
		TOPassword,
		AllowInsecureConnections,
		UserAgent,
		UseClientCache,
		TrafficOpsRequestTimeout)
	if err != nil {
		fmt.Printf("An error occurred while logging in:\n\t%v\n", err)
		os.Exit(1)
	}
	fmt.Println("Connected to: " + remoteaddr.String())
	var cdns []tc.CDN
	cdns, _, err = session.GetCDNs(nil)
	if err != nil {
		fmt.Printf("An error occurred while getting cdns:\n\t%v\n", err)
		os.Exit(1)
	}
	for _, cdn := range cdns {
		fmt.Println(cdn.Name)
	}
}

Documentation

Overview

Package client implements methods for interacting with the Traffic Ops API.

Package client provides Go bindings to the Traffic Ops RPC API.

Package client provides Go bindings to the Traffic Ops RPC API.

Index

Constants

View Source
const (
	ProfileIDQueryParam   = "profileId"
	ParameterIDQueryParam = "parameterId"
)

Supported query string parameter names.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	toclientlib.ClientOpts
}

Options is the options to configure the creation of the Client.

This exists to allow adding new features without a breaking change to the Login function. Users should understand this, and understand that upgrading their library may result in new options that their application doesn't know to use. New fields should always behave as-before if their value is the default.

type OuterResponse

type OuterResponse struct {
	Response json.RawMessage `json:"response"`
}

OuterResponse is the most basic type of a Traffic Ops API response, containing some kind of JSON-encoded 'response' object.

type PingResponse

type PingResponse struct {
	Ping string `json:"ping"`
	tc.Alerts
}

PingResponse is the type of a response from Traffic Ops to a requestt made to its /ping API endpoint.

type RequestOptions

type RequestOptions struct {
	// Any and all extra HTTP headers to pass in the request.
	Header http.Header
	// Any and all query parameters to pass in the request.
	QueryParameters url.Values
}

RequestOptions is the set of options commonly available to pass to methods of a Session.

func NewRequestOptions

func NewRequestOptions() RequestOptions

NewRequestOptions returns a RequestOptions object with initialized, empty Header and QueryParameters.

type Session

type Session struct {
	toclientlib.TOClient
}

Session is a Traffic Ops client.

func Login

func Login(url, user, pass string, opts Options) (*Session, toclientlib.ReqInf, error)

Login authenticates with Traffic Ops and returns the client object.

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.

See ClientOpts for details about options, which options are required, and how they behave.

func LoginWithAgent

func LoginWithAgent(toURL string, toUser string, toPasswd string, insecure bool, userAgent string, useCache bool, requestTimeout time.Duration) (*Session, net.Addr, error)

LoginWithAgent creates a new authenticated session with a Traffic Ops server. The session cookie should be set automatically in the returned Session, so that subsequent calls are properly authenticated without further manual intervention.

Returns the logged in client, the remote address of Traffic Ops which was translated and used to log in, and any error that occurred along the way. If the error is not nil, the remote address may or may not be nil, depending on whether the error occurred before the login request.

func LoginWithCert

func LoginWithCert(toURL string, insecure bool, requestTimeout time.Duration, certFile, keyFile, userAgent string) (*Session, net.Addr, error)

LoginWithCert creates a new authenticated session with a Traffic Ops server, and gives the client the ability to log in using certificates.

Returns the logged in client, the remote address of Traffic Ops which was translated and used to log in, and any error that occurred along the way. If the error is not nil, the remote address may or may not be nil, depending on whether the error occurred before the login request.

func LoginWithToken

func LoginWithToken(toURL string, token string, insecure bool, userAgent string, useCache bool, requestTimeout time.Duration) (*Session, net.Addr, error)

LoginWithToken functions identically to LoginWithAgent, but uses token-based authentication rather than a username/password pair.

func LogoutWithAgent

func LogoutWithAgent(toURL string, toUser string, toPasswd string, insecure bool, userAgent string, useCache bool, requestTimeout time.Duration) (*Session, net.Addr, error)

LogoutWithAgent constructs an authenticated Session - exactly like LoginWithAgent - and then immediately calls the '/logout' API endpoint to end the session.

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 NewSession(user, password, url, userAgent string, client *http.Client, useCache bool) *Session

NewSession constructs a new, unauthenticated Session using the provided information.

func (*Session) AddFederationResolverMappingsForCurrentUser

func (to *Session) AddFederationResolverMappingsForCurrentUser(
	mappings tc.DeliveryServiceFederationResolverMappingRequest,
	opts RequestOptions,
) (tc.Alerts, toclientlib.ReqInf, error)

AddFederationResolverMappingsForCurrentUser adds Federation Resolver mappings to one or more Delivery Services for the current user.

func (*Session) AddSSLKeysForDS

func (to *Session) AddSSLKeysForDS(request tc.DeliveryServiceAddSSLKeysReq, opts RequestOptions) (tc.SSLKeysAddResponse, toclientlib.ReqInf, error)

AddSSLKeysForDS adds SSL Keys for the given Delivery Service.

func (*Session) AllFederations

func (to *Session) AllFederations(opts RequestOptions) (tc.FederationsResponse, toclientlib.ReqInf, error)

AllFederations gets all Delivery Service-to-Federation mappings in Traffic Ops.

func (*Session) AssignDeliveryServiceIDsToServerID

func (to *Session) AssignDeliveryServiceIDsToServerID(server int, dsIDs []int, replace bool, opts RequestOptions) (tc.Alerts, toclientlib.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,
	opts RequestOptions,
) (tc.AssignFederationFederationResolversResponse, toclientlib.ReqInf, error)

AssignFederationFederationResolver assigns the resolvers identified in resolverIDs to the Federation identified by fedID. If replace is true, this will overwrite any and all existing resolvers assigned to the Federation.

func (*Session) AssignMultipleServersCapabilities

func (to *Session) AssignMultipleServersCapabilities(mssc tc.MultipleServersCapabilities, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

AssignMultipleServersCapabilities assigns multiple server capabilities to a server or multiple servers to a capability.

func (*Session) AssignServersToDeliveryService

func (to *Session) AssignServersToDeliveryService(servers []string, xmlID string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

AssignServersToDeliveryService assigns the given list of servers to the Delivery Service with the given xmlID.

func (*Session) AutoRenew

func (to *Session) AutoRenew(opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

AcmeAutorenew renews all ACME certificates asynchronously.

func (*Session) CopyProfile

func (to *Session) CopyProfile(p tc.ProfileCopy, opts RequestOptions) (tc.ProfileCopyResponse, toclientlib.ReqInf, error)

CopyProfile creates a new profile from an existing profile.

func (*Session) CreateASN

func (to *Session) CreateASN(asn tc.ASNV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateASN creates the passed ASN.

func (*Session) CreateCDN

func (to *Session) CreateCDN(cdn tc.CDNV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateCDN creates a CDN.

func (*Session) CreateCDNFederation

func (to *Session) CreateCDNFederation(f tc.CDNFederationV5, cdnName string, opts RequestOptions) (tc.CDNFederationV5Response, toclientlib.ReqInf, error)

CreateCDNFederation creates the given Federation in the CDN with the given name.

func (*Session) CreateCDNLock

func (to *Session) CreateCDNLock(cdnLock tc.CDNLock, opts RequestOptions) (tc.CDNLockCreateResponse, toclientlib.ReqInf, error)

CreateCDNLock creates a CDN Lock.

func (*Session) CreateCDNNotification

func (to *Session) CreateCDNNotification(notification tc.CDNNotificationRequest, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateCDNNotification creates a CDN notification.

func (*Session) CreateCacheGroup

func (to *Session) CreateCacheGroup(cachegroup tc.CacheGroupNullableV5, opts RequestOptions) (tc.CacheGroupDetailResponseV5, toclientlib.ReqInf, error)

CreateCacheGroup creates the given Cache Group.

func (*Session) CreateCoordinate

func (to *Session) CreateCoordinate(coordinate tc.CoordinateV5, opts RequestOptions) (tc.CoordinateResponseV5, toclientlib.ReqInf, error)

CreateCoordinate creates the given Coordinate.

func (*Session) CreateDeliveryService

func (to *Session) CreateDeliveryService(ds tc.DeliveryServiceV5, opts RequestOptions) (tc.DeliveryServiceResponseV5, toclientlib.ReqInf, error)

CreateDeliveryService creates the Delivery Service it's passed.

func (*Session) CreateDeliveryServiceRequest

func (to *Session) CreateDeliveryServiceRequest(dsr tc.DeliveryServiceRequestV5, opts RequestOptions) (tc.DeliveryServiceRequestResponseV5, toclientlib.ReqInf, error)

CreateDeliveryServiceRequest creates the given Delivery Service Request.

func (*Session) CreateDeliveryServiceRequestComment

func (to *Session) CreateDeliveryServiceRequestComment(comment tc.DeliveryServiceRequestCommentV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateDeliveryServiceRequestComment creates the given Delivery Service Request comment.

func (*Session) CreateDeliveryServiceServers

func (to *Session) CreateDeliveryServiceServers(dsID int, serverIDs []int, replace bool, opts RequestOptions) (tc.DeliveryserviceserverResponse, toclientlib.ReqInf, 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) CreateDeliveryServiceURISigningKeys

func (to *Session) CreateDeliveryServiceURISigningKeys(dsXMLID string, body tc.JWKSMap, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateDeliveryServiceURISigningKeys creates new URI-signing keys used by the Delivery Service identified by the XMLID 'dsXMLID'.

func (*Session) CreateDeliveryServiceURLSignatureKeys

func (to *Session) CreateDeliveryServiceURLSignatureKeys(dsName string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateDeliveryServiceURLSignatureKeys creates new URL-signing keys used by the Delivery Service identified by the XMLID 'dsName'.

func (*Session) CreateDeliveryServicesRequiredCapability

func (to *Session) CreateDeliveryServicesRequiredCapability(capability tc.DeliveryServicesRequiredCapability, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateDeliveryServicesRequiredCapability assigns a Required Capability to a Delivery Service.

func (*Session) CreateDivision

func (to *Session) CreateDivision(division tc.DivisionV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateDivision creates the given Division.

func (*Session) CreateFederationDeliveryServices

func (to *Session) CreateFederationDeliveryServices(
	federationID int,
	deliveryServiceIDs []int,
	replace bool,
	opts RequestOptions,
) (tc.Alerts, toclientlib.ReqInf, error)

CreateFederationDeliveryServices assigns the Delivery Services identified in 'deliveryServiceIDs' with the Federation identified by 'federationID'. If 'replace' is true, existing assignments for the Federation are overwritten.

func (*Session) CreateFederationResolver

func (to *Session) CreateFederationResolver(fr tc.FederationResolverV5, opts RequestOptions) (tc.FederationResolverResponseV5, toclientlib.ReqInf, error)

CreateFederationResolver creates the Federation Resolver 'fr'.

func (*Session) CreateFederationUsers

func (to *Session) CreateFederationUsers(federationID int, userIDs []int, replace bool, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateFederationUsers assigns the Federation identified by 'federationID' to the user(s) identified in 'userIDs'. If 'replace' is true, all existing user assignments for the Federation are overwritten.

func (*Session) CreateInvalidationJob

func (to *Session) CreateInvalidationJob(job tc.InvalidationJobCreateV4, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateInvalidationJob creates the passed Content Invalidation Job.

func (*Session) CreateMultipleParameters

func (to *Session) CreateMultipleParameters(pls []tc.ParameterV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateMultipleParameters performs a POST to create multiple Parameters at once.

func (*Session) CreateMultipleProfileParameters

func (to *Session) CreateMultipleProfileParameters(pps []tc.ProfileParameterCreationRequest, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateMultipleProfileParameters assigns multip Parameters to one or more Profiles at once.

func (*Session) CreateOrigin

func (to *Session) CreateOrigin(origin tc.OriginV5, opts RequestOptions) (tc.OriginDetailResponseV5, toclientlib.ReqInf, error)

CreateOrigin creates the given Origin.

func (*Session) CreateParameter

func (to *Session) CreateParameter(pl tc.ParameterV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateParameter performs a POST to create a Parameter.

func (*Session) CreatePhysLocation

func (to *Session) CreatePhysLocation(pl tc.PhysLocationV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreatePhysLocation creates the passed Physical Location.

func (*Session) CreateProfile

func (to *Session) CreateProfile(pl tc.ProfileV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateProfile creates the passed Profile.

func (*Session) CreateProfileParameter

func (to *Session) CreateProfileParameter(pp tc.ProfileParameterCreationRequest, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateProfileParameter assigns a Parameter to a Profile.

func (*Session) CreateProfileWithMultipleParameters

func (to *Session) CreateProfileWithMultipleParameters(pps tc.PostProfileParam, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateProfileWithMultipleParameters assigns multipe Parameters to one or more Profiles at once.

func (*Session) CreateRegion

func (to *Session) CreateRegion(region tc.RegionV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateRegion creates the given Region.

func (*Session) CreateRole

func (to *Session) CreateRole(role tc.RoleV4, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateRole creates the given Role.

func (*Session) CreateServer

func (to *Session) CreateServer(server tc.ServerV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateServer creates the given Server.

func (*Session) CreateServerCapability

func (to *Session) CreateServerCapability(sc tc.ServerCapabilityV5, opts RequestOptions) (tc.ServerCapabilityDetailResponseV5, toclientlib.ReqInf, error)

CreateServerCapability creates the given Server Capability.

func (*Session) CreateServerCheckExtension

func (to *Session) CreateServerCheckExtension(serverCheckExtension tc.ServerCheckExtensionNullable, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateServerCheckExtension creates the given Servercheck Extension.

func (*Session) CreateServerServerCapability

func (to *Session) CreateServerServerCapability(ssc tc.ServerServerCapabilityV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateServerServerCapability assigns a Server Capability to a Server.

func (*Session) CreateServiceCategory

func (to *Session) CreateServiceCategory(serviceCategory tc.ServiceCategoryV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateServiceCategory creates the given Service Category.

func (*Session) CreateStaticDNSEntry

func (to *Session) CreateStaticDNSEntry(sdns tc.StaticDNSEntryV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateStaticDNSEntry creates the given Static DNS Entry.

func (*Session) CreateStatus

func (to *Session) CreateStatus(status tc.StatusV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateStatus creates the given Status.

func (*Session) CreateSteeringTarget

func (to *Session) CreateSteeringTarget(st tc.SteeringTargetNullable, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateSteeringTarget adds the given Steering Target to a Steering Delivery Service.

func (*Session) CreateSummaryStats

func (to *Session) CreateSummaryStats(statsSummary tc.StatsSummaryV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateSummaryStats creates the given Stats Summary.

func (*Session) CreateTenant

func (to *Session) CreateTenant(t tc.TenantV5, opts RequestOptions) (tc.TenantResponseV5, toclientlib.ReqInf, error)

CreateTenant creates the Tenant it's passed.

func (*Session) CreateTopology

func (to *Session) CreateTopology(top tc.TopologyV5, opts RequestOptions) (tc.TopologyResponseV5, toclientlib.ReqInf, error)

CreateTopology creates the passed Topology.

func (*Session) CreateType

func (to *Session) CreateType(typ tc.TypeV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

CreateType creates the given Type. There should be a very good reason for doing this.

func (*Session) CreateUser

func (to *Session) CreateUser(user tc.UserV4, opts RequestOptions) (tc.CreateUserResponseV4, toclientlib.ReqInf, error)

CreateUser creates the given user.

func (*Session) DeleteASN

func (to *Session) DeleteASN(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteASN deletes the ASN with the given ID.

func (*Session) DeleteCDN

func (to *Session) DeleteCDN(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteCDN deletes the CDN with the given ID.

func (*Session) DeleteCDNDNSSECKeys

func (to *Session) DeleteCDNDNSSECKeys(name string, opts RequestOptions) (tc.DeleteCDNDNSSECKeysResponse, toclientlib.ReqInf, error)

DeleteCDNDNSSECKeys deletes all the DNSSEC keys for the given CDN.

func (*Session) DeleteCDNFederation

func (to *Session) DeleteCDNFederation(cdnName string, id int, opts RequestOptions) (tc.CDNFederationV5Response, toclientlib.ReqInf, error)

DeleteCDNFederation deletes the Federation with the given ID in the CDN with the given name.

func (*Session) DeleteCDNLocks

func (to *Session) DeleteCDNLocks(opts RequestOptions) (tc.CDNLockDeleteResponse, toclientlib.ReqInf, error)

DeleteCDNLocks deletes the CDN lock of a particular(requesting) user.

func (*Session) DeleteCDNNotification

func (to *Session) DeleteCDNNotification(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteCDNNotification deletes a CDN Notification by notification ID.

func (*Session) DeleteCacheGroup

func (to *Session) DeleteCacheGroup(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteCacheGroup deletes the Cache Group with the given ID.

func (*Session) DeleteCoordinate

func (to *Session) DeleteCoordinate(id int, opts RequestOptions) (tc.CoordinateResponseV5, toclientlib.ReqInf, error)

DeleteCoordinate deletes the Coordinate with the given ID.

func (*Session) DeleteDeliveryService

func (to *Session) DeleteDeliveryService(id int, opts RequestOptions) (tc.DeleteDeliveryServiceResponse, toclientlib.ReqInf, error)

DeleteDeliveryService deletes the DeliveryService matching the ID it's passed.

func (*Session) DeleteDeliveryServiceRequest

func (to *Session) DeleteDeliveryServiceRequest(id int, opts RequestOptions) (tc.DeliveryServiceRequestResponseV5, toclientlib.ReqInf, error)

DeleteDeliveryServiceRequest deletes the Delivery Service Request with the given ID.

func (*Session) DeleteDeliveryServiceRequestComment

func (to *Session) DeleteDeliveryServiceRequestComment(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteDeliveryServiceRequestComment deletes the Delivery Service Request comment with the given ID.

func (*Session) DeleteDeliveryServiceSSLKeys

func (to *Session) DeleteDeliveryServiceSSLKeys(xmlid string, opts RequestOptions) (tc.DeliveryServiceSSLKeysGenerationResponse, toclientlib.ReqInf, error)

DeleteDeliveryServiceSSLKeys deletes the SSL Keys used by the Delivery Service identified by the passed XMLID.

func (*Session) DeleteDeliveryServiceServer

func (to *Session) DeleteDeliveryServiceServer(dsID int, serverID int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteDeliveryServiceServer removes the association between the Delivery Service identified by dsID and the server identified by serverID.

func (*Session) DeleteDeliveryServiceURISigningKeys

func (to *Session) DeleteDeliveryServiceURISigningKeys(dsXMLID string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteDeliveryServiceURISigningKeys deletes the URI-signing keys used by the Delivery Service identified by the XMLID 'dsXMLID'.

func (*Session) DeleteDeliveryServiceURLSignatureKeys

func (to *Session) DeleteDeliveryServiceURLSignatureKeys(dsName string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteDeliveryServiceURLSignatureKeys deletes the URL-signing keys used by the Delivery Service identified by the XMLID 'dsName'.

func (*Session) DeleteDeliveryServicesRequiredCapability

func (to *Session) DeleteDeliveryServicesRequiredCapability(deliveryserviceID int, capability string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteDeliveryServicesRequiredCapability unassigns a Required Capability from a Delivery Service.

func (*Session) DeleteDivision

func (to *Session) DeleteDivision(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteDivision deletes the Division identified by 'id'.

func (*Session) DeleteFederationDeliveryService

func (to *Session) DeleteFederationDeliveryService(federationID, deliveryServiceID int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteFederationDeliveryService unassigns the Delivery Service identified by 'deliveryServiceID' from the Federation identified by 'federationID'.

func (*Session) DeleteFederationResolver

func (to *Session) DeleteFederationResolver(id uint, opts RequestOptions) (tc.FederationResolverResponse, toclientlib.ReqInf, error)

DeleteFederationResolver deletes the Federation Resolver identified by 'id'.

func (*Session) DeleteFederationResolverMappingsForCurrentUser

func (to *Session) DeleteFederationResolverMappingsForCurrentUser(opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

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

func (to *Session) DeleteFederationUser(federationID, userID int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteFederationUser unassigns the Federation identified by 'federationID' from the user identified by 'userID'.

func (*Session) DeleteInvalidationJob

func (to *Session) DeleteInvalidationJob(jobID uint64, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteInvalidationJob deletes the Content Invalidation Job identified by 'jobID'.

func (*Session) DeleteMultipleServersCapabilities

func (to *Session) DeleteMultipleServersCapabilities(mssc tc.MultipleServersCapabilities, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteMultipleServersCapabilities deletes multiple assigned server capabilities to a server or multiple servers to a capability.

func (*Session) DeleteOrigin

func (to *Session) DeleteOrigin(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteOrigin deletes the Origin with the given ID.

func (*Session) DeleteParameter

func (to *Session) DeleteParameter(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteParameter deletes the Parameter with the given ID.

func (*Session) DeletePhysLocation

func (to *Session) DeletePhysLocation(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeletePhysLocation deletes the Physical Location with the given ID.

func (*Session) DeleteProfile

func (to *Session) DeleteProfile(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteProfile deletes the Profile with the given ID.

func (*Session) DeleteProfileParameter

func (to *Session) DeleteProfileParameter(profile int, parameter int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteProfileParameter removes the Parameter with the ID 'parameter' from the Profile identified by the ID 'profile'.

func (*Session) DeleteRegion

func (to *Session) DeleteRegion(name string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteRegion lets you delete a Region. Regions can be deleted by ID instead of by name if the ID is provided in the request options and the name is an empty string.

func (*Session) DeleteRole

func (to *Session) DeleteRole(name string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteRole deletes the Role with the given ID.

func (*Session) DeleteServer

func (to *Session) DeleteServer(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteServer deletes the Server with the given ID.

func (*Session) DeleteServerCapability

func (to *Session) DeleteServerCapability(name string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteServerCapability deletes the given server capability by name.

func (*Session) DeleteServerCheckExtension

func (to *Session) DeleteServerCheckExtension(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteServerCheckExtension deletes the Servercheck Extension identified by 'id'.

func (*Session) DeleteServerServerCapability

func (to *Session) DeleteServerServerCapability(serverID int, serverCapability string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteServerServerCapability unassigns a Server Capability from a Server.

func (*Session) DeleteServiceCategory

func (to *Session) DeleteServiceCategory(name string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteServiceCategory deletes the Service Category with the given Name.

func (*Session) DeleteStaticDNSEntry

func (to *Session) DeleteStaticDNSEntry(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteStaticDNSEntry deletes the Static DNS Entry with the given ID.

func (*Session) DeleteStatus

func (to *Session) DeleteStatus(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteStatus deletes the Status with the given ID.

func (*Session) DeleteSteeringTarget

func (to *Session) DeleteSteeringTarget(dsID int, targetID int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteSteeringTarget removes the Target identified by 'targetID' from the Delivery Service identified by 'dsID'.

func (*Session) DeleteTenant

func (to *Session) DeleteTenant(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteTenant deletes the Tenant matching the ID it's passed.

func (*Session) DeleteTopology

func (to *Session) DeleteTopology(name string, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteTopology deletes the Topology with the given name.

func (*Session) DeleteType

func (to *Session) DeleteType(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteType deletes the Type with the given ID.

func (*Session) DeleteUser

func (to *Session) DeleteUser(id int, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

DeleteUser deletes the User with the given ID.

func (*Session) ExportProfile

func (to *Session) ExportProfile(id int, opts RequestOptions) (tc.ProfileExportResponse, toclientlib.ReqInf, error)

ExportProfile Returns an exported Profile.

func (*Session) Federations

func (to *Session) Federations(opts RequestOptions) (tc.FederationsResponse, toclientlib.ReqInf, error)

Federations gets all Delivery Service-to-Federation mappings in Traffic Ops that are assigned to the current user.

func (*Session) GenerateCDNDNSSECKSK

func (to *Session) GenerateCDNDNSSECKSK(name string, req tc.CDNGenerateKSKReq, opts RequestOptions) (tc.GenerateCDNDNSSECKeysResponse, toclientlib.ReqInf, error)

GenerateCDNDNSSECKSK generates the DNSSEC KSKs (key-signing key) for the given CDN.

func (*Session) GenerateCDNDNSSECKeys

func (to *Session) GenerateCDNDNSSECKeys(req tc.CDNDNSSECGenerateReq, opts RequestOptions) (tc.GenerateCDNDNSSECKeysResponse, toclientlib.ReqInf, error)

GenerateCDNDNSSECKeys generates DNSSEC keys for the given CDN.

func (*Session) GenerateSSLKeysForDS

func (to *Session) GenerateSSLKeysForDS(
	xmlid string,
	cdnName string,
	sslFields tc.SSLKeyRequestFields,
	opts RequestOptions,
) (tc.DeliveryServiceSSLKeysGenerationResponse, toclientlib.ReqInf, error)

GenerateSSLKeysForDS generates ssl keys for a given cdn.

func (*Session) GetASNs

func (to *Session) GetASNs(opts RequestOptions) (tc.ASNsResponseV5, toclientlib.ReqInf, error)

GetASNs retrieves ASNs from Traffic Ops.

func (*Session) GetAbout

func (to *Session) GetAbout(opts RequestOptions) (map[string]string, toclientlib.ReqInf, error)

GetAbout gets data about the TO instance.

func (*Session) GetAsyncStatus

func (to *Session) GetAsyncStatus(id int, opts RequestOptions) (tc.AsyncStatusResponse, toclientlib.ReqInf, error)

GetAsyncStatus gets an async_status from Traffic Ops.

func (*Session) GetCDNDNSSECKeys

func (to *Session) GetCDNDNSSECKeys(name string, opts RequestOptions) (tc.CDNDNSSECKeysResponse, toclientlib.ReqInf, error)

GetCDNDNSSECKeys gets the DNSSEC keys for the given CDN.

func (*Session) GetCDNFederations

func (to *Session) GetCDNFederations(cdnName string, opts RequestOptions) (tc.CDNFederationsV5Response, toclientlib.ReqInf, error)

GetCDNFederationsByName retrieves all Federations in the CDN with the given name.

func (*Session) GetCDNLocks

func (to *Session) GetCDNLocks(opts RequestOptions) (tc.CDNLocksGetResponse, toclientlib.ReqInf, error)

GetCDNLocks retrieves the CDN locks based on the passed in parameters.

func (*Session) GetCDNNotifications

func (to *Session) GetCDNNotifications(opts RequestOptions) (tc.CDNNotificationsResponse, toclientlib.ReqInf, error)

GetCDNNotifications returns a list of CDN Notifications.

func (*Session) GetCDNSSLKeys

func (to *Session) GetCDNSSLKeys(name string, opts RequestOptions) (tc.CDNSSLKeysResponse, toclientlib.ReqInf, error)

GetCDNSSLKeys retrieves the SSL keys for the CDN with the given name.

func (*Session) GetCDNs

func (to *Session) GetCDNs(opts RequestOptions) (tc.CDNsV5Response, toclientlib.ReqInf, error)

GetCDNs retrieves CDNs from Traffic Ops.

func (*Session) GetCRConfig

func (to *Session) GetCRConfig(cdn string, opts RequestOptions) (tc.SnapshotResponse, toclientlib.ReqInf, error)

GetCRConfig returns the Snapshot for the given CDN from Traffic Ops.

func (*Session) GetCRConfigNew

func (to *Session) GetCRConfigNew(cdn string, opts RequestOptions) (tc.SnapshotResponse, toclientlib.ReqInf, error)

GetCRConfigNew returns the *new* Snapshot for the given CDN from Traffic Ops.

func (*Session) GetCacheGroups

func (to *Session) GetCacheGroups(opts RequestOptions) (tc.CacheGroupsNullableResponseV5, toclientlib.ReqInf, error)

GetCacheGroups retrieves Cache Groups configured in Traffic Ops.

func (*Session) GetCoordinates

func (to *Session) GetCoordinates(opts RequestOptions) (tc.CoordinatesResponseV5, toclientlib.ReqInf, error)

GetCoordinates returns all Coordinates in Traffic Ops.

func (*Session) GetCurrentStats

func (to *Session) GetCurrentStats(opts RequestOptions) (tc.CurrentStatsResponse, toclientlib.ReqInf, error)

GetCurrentStats gets current stats for each CDNs and a total across them.

func (*Session) GetDeliveryServiceCapacity

func (to *Session) GetDeliveryServiceCapacity(id int, opts RequestOptions) (tc.DeliveryServiceCapacityResponse, toclientlib.ReqInf, error)

GetDeliveryServiceCapacity gets the 'capacity' of the Delivery Service identified by the integral, unique identifier 'id'.

func (*Session) GetDeliveryServiceHealth

func (to *Session) GetDeliveryServiceHealth(id int, opts RequestOptions) (tc.DeliveryServiceHealthResponse, toclientlib.ReqInf, error)

GetDeliveryServiceHealth gets the 'health' of the Delivery Service identified by the integral, unique identifier 'id'.

func (*Session) GetDeliveryServiceRegexes

func (to *Session) GetDeliveryServiceRegexes(opts RequestOptions) (tc.DeliveryServiceRegexResponse, toclientlib.ReqInf, error)

GetDeliveryServiceRegexes retrieves all Delivery Service Regexes in Traffic Ops.

func (*Session) GetDeliveryServiceRegexesByDSID

func (to *Session) GetDeliveryServiceRegexesByDSID(dsID int, opts RequestOptions) (tc.DeliveryServiceIDRegexResponse, toclientlib.ReqInf, error)

GetDeliveryServiceRegexesByDSID gets DeliveryServiceRegexes by a DS id also accepts an optional map of query parameters.

func (*Session) GetDeliveryServiceRequestComments

func (to *Session) GetDeliveryServiceRequestComments(opts RequestOptions) (tc.DeliveryServiceRequestCommentsResponseV5, toclientlib.ReqInf, error)

GetDeliveryServiceRequestComments retrieves all comments on all Delivery Service Requests.

func (*Session) GetDeliveryServiceRequests

func (to *Session) GetDeliveryServiceRequests(opts RequestOptions) (tc.DeliveryServiceRequestsResponseV5, toclientlib.ReqInf, error)

GetDeliveryServiceRequests retrieves Delivery Service Requests available to session user.

func (*Session) GetDeliveryServiceSSLKeys

func (to *Session) GetDeliveryServiceSSLKeys(xmlid string, opts RequestOptions) (tc.DeliveryServiceSSLKeysResponse, toclientlib.ReqInf, error)

GetDeliveryServiceSSLKeys retrieves the SSL keys of the Delivery Service with the given XMLID.

func (*Session) GetDeliveryServiceServers

func (to *Session) GetDeliveryServiceServers(opts RequestOptions) (tc.DeliveryServiceServerResponseV5, toclientlib.ReqInf, error)

GetDeliveryServiceServers returns associations between Delivery Services and servers.

func (*Session) GetDeliveryServiceURISigningKeys

func (to *Session) GetDeliveryServiceURISigningKeys(dsName string, opts RequestOptions) ([]byte, toclientlib.ReqInf, error)

GetDeliveryServiceURISigningKeys returns the URI-signing keys used by the Delivery Service identified by the XMLID 'dsName'. The result is not parsed. Note that unlike most methods, this is incapable of returning alerts.

func (*Session) GetDeliveryServiceURLSignatureKeys

func (to *Session) GetDeliveryServiceURLSignatureKeys(dsName string, opts RequestOptions) (tc.URLSignatureKeysResponse, toclientlib.ReqInf, error)

GetDeliveryServiceURLSignatureKeys returns the URL-signing keys used by the Delivery Service identified by the XMLID 'dsName'.

func (*Session) GetDeliveryServices

func (to *Session) GetDeliveryServices(opts RequestOptions) (tc.DeliveryServicesResponseV5, toclientlib.ReqInf, error)

GetDeliveryServices returns (tenant-visible) Delivery Services.

func (*Session) GetDeliveryServicesByServer

func (to *Session) GetDeliveryServicesByServer(id int, opts RequestOptions) (tc.DeliveryServicesResponseV5, toclientlib.ReqInf, error)

GetDeliveryServicesByServer retrieves all Delivery Services assigned to the server with the given ID.

func (*Session) GetDeliveryServicesEligible

func (to *Session) GetDeliveryServicesEligible(dsID int, opts RequestOptions) (tc.DSServerResponseV5, toclientlib.ReqInf, error)

GetDeliveryServicesEligible returns the servers eligible for assignment to the Delivery Service identified by the integral, unique identifier 'dsID'.

func (*Session) GetDeliveryServicesRequiredCapabilities

func (to *Session) GetDeliveryServicesRequiredCapabilities(opts RequestOptions) (tc.DeliveryServicesRequiredCapabilitiesResponse, toclientlib.ReqInf, error)

GetDeliveryServicesRequiredCapabilities retrieves a list of relationships between Delivery Services and the Capabilities they require.

func (*Session) GetDivisions

func (to *Session) GetDivisions(opts RequestOptions) (tc.DivisionsResponseV5, toclientlib.ReqInf, error)

GetDivisions returns Divisions from Traffic Ops.

func (*Session) GetDomains

func (to *Session) GetDomains(opts RequestOptions) (tc.DomainsResponse, toclientlib.ReqInf, error)

GetDomains gets all CDN Domains.

func (*Session) GetExpiringCerts

func (to *Session) GetExpiringCerts(opts RequestOptions) (tc.SSLKeyExpirationGetResponse, toclientlib.ReqInf, error)

GetExpiringCerts gets the exiring certs within the days if 'days' param is passed or the full list of all Delivery services and there expirations

func (*Session) GetFederationDeliveryServices

func (to *Session) GetFederationDeliveryServices(federationID int, opts RequestOptions) (tc.FederationDeliveryServicesResponse, toclientlib.ReqInf, error)

GetFederationDeliveryServices returns the Delivery Services assigned to the Federation identified by 'federationID'.

func (*Session) GetFederationFederationResolvers

func (to *Session) GetFederationFederationResolvers(id int, opts RequestOptions) (tc.FederationFederationResolversResponse, toclientlib.ReqInf, error)

GetFederationFederationResolvers retrieves all Federation Resolvers belonging to Federation of ID.

func (*Session) GetFederationResolvers

func (to *Session) GetFederationResolvers(opts RequestOptions) (tc.FederationResolversResponseV5, toclientlib.ReqInf, error)

GetFederationResolvers retrieves Federation Resolvers from Traffic Ops.

func (*Session) GetFederationUsers

func (to *Session) GetFederationUsers(federationID int, opts RequestOptions) (tc.FederationUsersResponse, toclientlib.ReqInf, error)

GetFederationUsers retrieves all users to whom the Federation identified by 'federationID' is assigned.

func (*Session) GetInvalidationJobs

func (to *Session) GetInvalidationJobs(opts RequestOptions) (tc.InvalidationJobsResponseV4, toclientlib.ReqInf, error)

GetInvalidationJobs returns a list of Content Invalidation Jobs visible to your Tenant.

func (*Session) GetLogs

func (to *Session) GetLogs(opts RequestOptions) (tc.LogsResponseV5, toclientlib.ReqInf, error)

GetLogs gets a list of logs.

func (*Session) GetOSVersions

func (to *Session) GetOSVersions(opts RequestOptions) (tc.OSVersionsAPIResponse, toclientlib.ReqInf, error)

GetOSVersions GETs all available Operating System (OS) versions for ISO generation, as well as the name of the directory where the "kickstarter" files are found.

func (*Session) GetOrigins

func (to *Session) GetOrigins(opts RequestOptions) (tc.OriginsResponseV5, toclientlib.ReqInf, error)

GetOrigins retrieves Origins from Traffic Ops.

func (*Session) GetParameters

func (to *Session) GetParameters(opts RequestOptions) (tc.ParametersResponseV5, toclientlib.ReqInf, error)

GetParameters returns all Parameters in Traffic Ops.

func (*Session) GetParametersByProfileName

func (to *Session) GetParametersByProfileName(profileName string, opts RequestOptions) (tc.ParametersResponseV5, toclientlib.ReqInf, error)

GetParametersByProfileName returns all of the Parameters that are assigned to the Profile with the given Name.

func (*Session) GetPhysLocations

func (to *Session) GetPhysLocations(opts RequestOptions) (tc.PhysLocationsResponseV5, toclientlib.ReqInf, error)

GetPhysLocations retrieves Physical Locations from Traffic Ops.

func (*Session) GetProfileParameters

func (to *Session) GetProfileParameters(opts RequestOptions) (tc.ProfileParametersAPIResponseV5, toclientlib.ReqInf, error)

GetProfileParameters retrieves associations between Profiles and Parameters.

func (*Session) GetProfiles

func (to *Session) GetProfiles(opts RequestOptions) (tc.ProfilesResponseV5, toclientlib.ReqInf, error)

GetProfiles returns all Profiles stored in Traffic Ops.

func (*Session) GetRegions

func (to *Session) GetRegions(opts RequestOptions) (tc.RegionsResponseV5, toclientlib.ReqInf, error)

GetRegions returns all Regions in Traffic Ops.

func (*Session) GetRoles

func (to *Session) GetRoles(opts RequestOptions) (tc.RolesResponseV4, toclientlib.ReqInf, error)

GetRoles retrieves Roles from Traffic Ops.

func (*Session) GetServerCapabilities

func (to *Session) GetServerCapabilities(opts RequestOptions) (tc.ServerCapabilitiesResponseV5, toclientlib.ReqInf, error)

GetServerCapabilities returns all the Server Capabilities in Traffic Ops.

func (*Session) GetServerCheckExtensions

func (to *Session) GetServerCheckExtensions(opts RequestOptions) (tc.ServerCheckExtensionResponse, toclientlib.ReqInf, error)

GetServerCheckExtensions gets all Servercheck Extensions in Traffic Ops.

func (*Session) GetServerIDDeliveryServices

func (to *Session) GetServerIDDeliveryServices(server int, opts RequestOptions) (tc.DeliveryServicesResponseV5, toclientlib.ReqInf, error)

GetServerIDDeliveryServices returns all of the Delivery Services assigned to the server identified by the integral, unique identifier 'server'.

func (*Session) GetServerServerCapabilities

func (to *Session) GetServerServerCapabilities(opts RequestOptions) (tc.ServerServerCapabilitiesResponseV5, toclientlib.ReqInf, error)

GetServerServerCapabilities retrieves a list of Server Capabilities that are assigned to Servers.

func (*Session) GetServerUpdateStatus

func (to *Session) GetServerUpdateStatus(hostName string, opts RequestOptions) (tc.ServerUpdateStatusResponseV5, toclientlib.ReqInf, error)

GetServerUpdateStatus retrieves the Server Update Status of the Server with the given (short) hostname.

func (*Session) GetServers

func (to *Session) GetServers(opts RequestOptions) (tc.ServersV5Response, toclientlib.ReqInf, error)

GetServers retrieves Servers from Traffic Ops.

func (*Session) GetServersByDeliveryService

func (to *Session) GetServersByDeliveryService(id int, opts RequestOptions) (tc.DSServerResponseV5, toclientlib.ReqInf, error)

GetServersByDeliveryService gets the servers that are assigned to the delivery service with the given ID.

func (*Session) GetServersChecks

func (to *Session) GetServersChecks(opts RequestOptions) (tc.ServercheckAPIResponse, toclientlib.ReqInf, error)

GetServersChecks fetches check and meta information about servers from /servercheck.

func (*Session) GetServiceCategories

func (to *Session) GetServiceCategories(opts RequestOptions) (tc.ServiceCategoriesResponseV5, toclientlib.ReqInf, error)

GetServiceCategories retrieves Service Categories from Traffic Ops.

func (*Session) GetStaticDNSEntries

func (to *Session) GetStaticDNSEntries(opts RequestOptions) (tc.StaticDNSEntriesResponseV5, toclientlib.ReqInf, error)

GetStaticDNSEntries retrieves all Static DNS Entries stored in Traffic Ops.

func (*Session) GetStatuses

func (to *Session) GetStatuses(opts RequestOptions) (tc.StatusesResponse, toclientlib.ReqInf, error)

GetStatuses retrieves all Statuses stored in Traffic Ops.

func (*Session) GetSteeringTargets

func (to *Session) GetSteeringTargets(dsID int, opts RequestOptions) (tc.SteeringTargetsResponse, toclientlib.ReqInf, error)

GetSteeringTargets retrieves all Targets for the Steering Delivery Service with the given ID.

func (*Session) GetSummaryStats

func (to *Session) GetSummaryStats(opts RequestOptions) (tc.StatsSummaryResponseV5, toclientlib.ReqInf, error)

GetSummaryStats gets a list of Summary Stats with the ability to filter on CDN, Delivery Service, and/or stat name.

func (*Session) GetSummaryStatsLastUpdated

func (to *Session) GetSummaryStatsLastUpdated(opts RequestOptions) (tc.StatsSummaryLastUpdatedAPIResponseV5, toclientlib.ReqInf, error)

GetSummaryStatsLastUpdated gets the time at which Stat Summaries were last updated. If 'statName' isn't nil, the response will be limited to the stat thereby named.

func (*Session) GetTenants

func (to *Session) GetTenants(opts RequestOptions) (tc.GetTenantsResponseV5, toclientlib.ReqInf, error)

GetTenants retrieves all Tenants stored in Traffic Ops.

func (*Session) GetTopologies

func (to *Session) GetTopologies(opts RequestOptions) (tc.TopologiesResponseV5, toclientlib.ReqInf, error)

GetTopologies returns all Topologies stored in Traffic Ops.

func (*Session) GetTrafficMonitorConfig

func (to *Session) GetTrafficMonitorConfig(cdn string, opts RequestOptions) (tc.TMConfigResponse, toclientlib.ReqInf, error)

GetTrafficMonitorConfig returns the monitoring configuration for the CDN named by 'cdn'.

func (*Session) GetTypes

func (to *Session) GetTypes(opts RequestOptions) (tc.TypesResponseV5, toclientlib.ReqInf, error)

GetTypes returns a list of Types, with an http header and 'useInTable' parameters. If a 'useInTable' parameter is passed, the returned Types are restricted to those with that exact 'useInTable' property. Only exactly 1 or exactly 0 'useInTable' parameters may be passed; passing more will result in an error being returned.

func (*Session) GetUserCurrent

func (to *Session) GetUserCurrent(opts RequestOptions) (UserCurrentResponseV4, toclientlib.ReqInf, error)

GetUserCurrent retrieves the currently authenticated User.

func (*Session) GetUsers

func (to *Session) GetUsers(opts RequestOptions) (tc.UsersResponseV4, toclientlib.ReqInf, error)

GetUsers retrieves all (Tenant-accessible) Users stored in Traffic Ops.

func (*Session) ImportProfile

func (to *Session) ImportProfile(importRequest tc.ProfileImportRequest, opts RequestOptions) (tc.ProfileImportResponse, toclientlib.ReqInf, error)

ImportProfile imports an exported Profile.

func (*Session) InsertServerCheckStatus

func (to *Session) InsertServerCheckStatus(status tc.ServercheckRequestNullable, opts RequestOptions) (tc.ServercheckPostResponse, toclientlib.ReqInf, error)

InsertServerCheckStatus will insert/update the Servercheck value based on if it already exists or not.

func (*Session) Ping

Ping returns a simple response to show that Traffic Ops is responsive.

func (*Session) PostDeliveryServiceRegexesByDSID

func (to *Session) PostDeliveryServiceRegexesByDSID(dsID int, regex tc.DeliveryServiceRegexPost, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

PostDeliveryServiceRegexesByDSID adds the given Regex to the identified Delivery Service.

func (*Session) QueueUpdatesForCDN

func (to *Session) QueueUpdatesForCDN(cdnID int, queueUpdate bool, opts RequestOptions) (tc.CDNQueueUpdateResponse, toclientlib.ReqInf, error)

QueueUpdatesForCDN set the "updPending" field of a list of servers identified by 'cdnID' and any other query params (type or profile) to the value of 'queueUpdate'

func (*Session) RefreshDNSSECKeys

func (to *Session) RefreshDNSSECKeys(opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

RefreshDNSSECKeys asynchronously regenerates any expired DNSSEC keys in all CDNs.

func (*Session) RegisterNewUser

func (to *Session) RegisterNewUser(tenantID uint, role string, email rfc.EmailAddress, opts RequestOptions) (tc.Alerts, toclientlib.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,
	opts RequestOptions,
) (tc.Alerts, toclientlib.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) SafeDeliveryServiceUpdate

func (to *Session) SafeDeliveryServiceUpdate(
	id int,
	r tc.DeliveryServiceSafeUpdateRequest,
	opts RequestOptions,
) (tc.DeliveryServiceResponseV5, toclientlib.ReqInf, error)

SafeDeliveryServiceUpdate updates the "safe" fields of the Delivery Service identified by the integral, unique identifier 'id'.

func (*Session) SetCacheGroupDeliveryServices

func (to *Session) SetCacheGroupDeliveryServices(cgID int, dsIDs []int, opts RequestOptions) (tc.CacheGroupPostDSRespResponse, toclientlib.ReqInf, error)

SetCacheGroupDeliveryServices assigns all of the assignable Cache Servers in the identified Cache Group to all of the identified the Delivery Services.

func (*Session) SetServerQueueUpdate

func (to *Session) SetServerQueueUpdate(serverID int, queueUpdate bool, opts RequestOptions) (tc.ServerQueueUpdateResponse, toclientlib.ReqInf, error)

SetServerQueueUpdate set the "updPending" field of th eserver identified by 'serverID' to the value of 'queueUpdate - and properly queues updates on parents/children as necessary.

func (*Session) SetUpdateServerStatusTimes

func (to *Session) SetUpdateServerStatusTimes(serverName string, configApplyTime, revalApplyTime *time.Time, configUpdateFailed, revalUpdateFailed *bool, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

SetUpdateServerStatusTimes updates a server's config queue status and/or reval status. Each argument individually is optional, however at least one argument must not be nil.

func (*Session) SnapshotCRConfig

func (to *Session) SnapshotCRConfig(opts RequestOptions) (tc.PutSnapshotResponse, toclientlib.ReqInf, error)

SnapshotCRConfig creates a new Snapshot for the CDN with the given Name - NOT just a new CRConfig!

func (*Session) Steering

func (to *Session) Steering(opts RequestOptions) (tc.SteeringResponse, toclientlib.ReqInf, error)

Steering retrieves information about all (Tenant-accessible) Steering Delivery Services stored in Traffic Ops assigned to the requesting user.

func (*Session) TopologiesQueueUpdate

func (to *Session) TopologiesQueueUpdate(topologyName string, req tc.TopologiesQueueUpdateRequest, opts RequestOptions) (tc.TopologiesQueueUpdateResponse, toclientlib.ReqInf, error)

TopologiesQueueUpdate queues updates for the Topology with the given Name.

func (*Session) TrafficVaultPing

func (to *Session) TrafficVaultPing(opts RequestOptions) (tc.TrafficVaultPingResponse, toclientlib.ReqInf, error)

TrafficVaultPing returns a response indicating whether or not Traffic Vault is responsive.

func (*Session) UpdateASN

func (to *Session) UpdateASN(id int, entity tc.ASNV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateASN updates the ASN identified by id by replacing it with the passed ASN.

func (*Session) UpdateCDN

func (to *Session) UpdateCDN(id int, cdn tc.CDNV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateCDN replaces the identified CDN with the provided CDN.

func (*Session) UpdateCDNFederation

func (to *Session) UpdateCDNFederation(f tc.CDNFederationV5, cdnName string, id int, opts RequestOptions) (tc.CDNFederationV5Response, toclientlib.ReqInf, error)

UpdateCDNFederation replaces the Federation with the given ID in the CDN with the given name with the provided Federation.

func (*Session) UpdateCacheGroup

func (to *Session) UpdateCacheGroup(id int, cachegroup tc.CacheGroupNullableV5, opts RequestOptions) (tc.CacheGroupDetailResponseV5, toclientlib.ReqInf, error)

UpdateCacheGroup replaces the Cache Group identified by the given ID with the given Cache Group.

func (*Session) UpdateCoordinate

func (to *Session) UpdateCoordinate(id int, coordinate tc.CoordinateV5, opts RequestOptions) (tc.CoordinateResponseV5, toclientlib.ReqInf, error)

UpdateCoordinate replaces the Coordinate with the given ID with the one provided.

func (*Session) UpdateCurrentUser

func (to *Session) UpdateCurrentUser(u tc.UserV4, opts RequestOptions) (tc.UpdateUserResponseV4, toclientlib.ReqInf, error)

UpdateCurrentUser replaces the current user data with the provided tc.UserV4 structure.

func (*Session) UpdateDeliveryService

func (to *Session) UpdateDeliveryService(id int, ds tc.DeliveryServiceV5, opts RequestOptions) (tc.DeliveryServiceResponseV5, toclientlib.ReqInf, error)

UpdateDeliveryService replaces the Delivery Service identified by the integral, unique identifier 'id' with the one it's passed.

func (*Session) UpdateDeliveryServiceRequest

func (to *Session) UpdateDeliveryServiceRequest(id int, dsr tc.DeliveryServiceRequestV5, opts RequestOptions) (tc.DeliveryServiceRequestResponseV5, toclientlib.ReqInf, error)

UpdateDeliveryServiceRequest replaces the existing DSR that has the given ID with the DSR passed.

func (*Session) UpdateDeliveryServiceRequestComment

func (to *Session) UpdateDeliveryServiceRequestComment(id int, comment tc.DeliveryServiceRequestCommentV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateDeliveryServiceRequestComment replaces the Delivery Service Request comment identified by 'id' with the one provided.

func (*Session) UpdateDivision

func (to *Session) UpdateDivision(id int, division tc.DivisionV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateDivision replaces the Division identified by 'id' with the one provided.

func (*Session) UpdateInvalidationJob

func (to *Session) UpdateInvalidationJob(job tc.InvalidationJobV4, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateInvalidationJob updates the passed Content Invalidation Job (it is expected to have an ID).

func (*Session) UpdateOrigin

func (to *Session) UpdateOrigin(id int, origin tc.OriginV5, opts RequestOptions) (tc.OriginDetailResponseV5, toclientlib.ReqInf, error)

UpdateOrigin replaces the Origin identified by 'id' with the passed Origin.

func (*Session) UpdateParameter

func (to *Session) UpdateParameter(id int, pl tc.ParameterV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateParameter replaces the Parameter identified by 'id' with the one provided.

func (*Session) UpdatePhysLocation

func (to *Session) UpdatePhysLocation(id int, pl tc.PhysLocationV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdatePhysLocation replaces the Physical Location identified by 'id' with the given Physical Location structure.

func (*Session) UpdateProfile

func (to *Session) UpdateProfile(id int, pl tc.ProfileV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateProfile replaces the Profile identified by ID with the one provided.

func (*Session) UpdateRegion

func (to *Session) UpdateRegion(id int, region tc.RegionV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateRegion replaces the Region identified by ID with the one provided.

func (*Session) UpdateRole

func (to *Session) UpdateRole(name string, role tc.RoleV4, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateRole replaces the Role identified by 'id' with the one provided.

func (*Session) UpdateServer

func (to *Session) UpdateServer(id int, server tc.ServerV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateServer replaces the Server identified by ID with the provided one.

func (*Session) UpdateServerCapability

func (to *Session) UpdateServerCapability(name string, sc tc.ServerCapabilityV5, opts RequestOptions) (tc.ServerCapabilityDetailResponseV5, toclientlib.ReqInf, error)

UpdateServerCapability updates a Server Capability by name.

func (*Session) UpdateServerStatus

func (to *Session) UpdateServerStatus(serverID int, req tc.ServerPutStatus, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateServerStatus updates the Status of the server identified by 'serverID'.

func (*Session) UpdateServiceCategory

func (to *Session) UpdateServiceCategory(name string, serviceCategory tc.ServiceCategoryV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateServiceCategory replaces the Service Category with the given Name with the one provided.

func (*Session) UpdateStaticDNSEntry

func (to *Session) UpdateStaticDNSEntry(id int, sdns tc.StaticDNSEntryV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateStaticDNSEntry replaces the Static DNS Entry identified by 'id' with the one provided.

func (*Session) UpdateStatus

func (to *Session) UpdateStatus(id int, status tc.StatusV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateStatus replaces the Status identified by 'id' with the one provided.

func (*Session) UpdateSteeringTarget

func (to *Session) UpdateSteeringTarget(st tc.SteeringTargetNullable, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateSteeringTarget replaces an existing Steering Target association with the newly provided configuration. 'st' must have both a Delivery Service ID and a Target ID.

func (*Session) UpdateTenant

func (to *Session) UpdateTenant(id int, t tc.TenantV5, opts RequestOptions) (tc.TenantResponseV5, toclientlib.ReqInf, error)

UpdateTenant replaces the Tenant identified by 'id' with the one provided.

func (*Session) UpdateTopology

func (to *Session) UpdateTopology(name string, t tc.TopologyV5, opts RequestOptions) (tc.TopologyResponseV5, toclientlib.ReqInf, error)

UpdateTopology updates a Topology by name.

func (*Session) UpdateType

func (to *Session) UpdateType(id int, typ tc.TypeV5, opts RequestOptions) (tc.Alerts, toclientlib.ReqInf, error)

UpdateType replaces the Type identified by 'id' with the one provided.

func (*Session) UpdateUser

func (to *Session) UpdateUser(id int, u tc.UserV4, opts RequestOptions) (tc.UpdateUserResponseV4, toclientlib.ReqInf, error)

UpdateUser replaces the User identified by 'id' with the one provided.

type UserCurrentResponseV4

type UserCurrentResponseV4 = tc.UserCurrentResponseV4

UserCurrentResponseV4 is an alias to avoid client breaking changes. In-case of a minor or major version change, we replace the below alias with a new structure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL