package
7.0.1+incompatible
Repository: https://github.com/apache/trafficcontrol.git
Documentation: pkg.go.dev
# Functions
AddTenancyCheck takes a WHERE clause (can be ""), the associated queryValues (can be empty), a tenantColumnName that should provide a bigint corresponding to the tenantID of the object being checked (this may require a CAST), and an array of the tenantIDs the user has access to; it returns a where clause and associated queryValues including filtering based on tenancy.
AppendWhere appends 'extra' safely to the WHERE clause 'where'.
No description provided by the author
CheckCachegroupHasTopologyBasedDeliveryServicesOnCDN returns true if the given cachegroup is assigned to any topologies with delivery services assigned on the given CDN.
CachegroupParameterAssociationExists returns whether a cachegroup parameter association with the given parameter id exists, and any error.
Returns true if the cdn exists.
CheckIfCurrentUserCanModifyCachegroup checks if the current user has the lock on the cdns that are associated with the provided cachegroup ID.
CheckIfCurrentUserCanModifyCachegroups checks if the current user has the lock on the cdns that are associated with the provided cachegroup IDs.
CheckIfCurrentUserCanModifyCDN checks if the current user has the lock on the cdn that the requested operation is to be performed on.
CheckIfCurrentUserCanModifyCDNs checks if the current user has the lock on the list of cdns that the requested operation is to be performed on.
CheckIfCurrentUserCanModifyCDNs checks if the current user has the lock on the list of cdns(identified by ID) that the requested operation is to be performed on.
CheckIfCurrentUserCanModifyCDNWithID checks if the current user has the lock on the cdn (identified by ID) that the requested operation is to be performed on.
CheckIfCurrentUserHasCdnLock checks if the current user has the lock on the cdn that the requested operation is to be performed on.
CheckOriginServerInDSCG checks if a DS has ORG server and if it does, to make sure the cachegroup is part of DS.
CheckTopology returns an error if the given Topology does not exist or if one of the Topology's Cache Groups is empty with respect to the Delivery Service's CDN.
CheckTopologyOrgServerCGInDSCG checks if ORG server are part of DS.
CommitIf commits if doCommit is true at the time of execution.
DequeueUpdateForServer sets the config update time equal to the config apply time, thereby effectively dequeueing any pending updates for the server specified.
DequeueUpdateForServerWithCachegroupCDN sets the config update time equal to the config apply time, thereby effectively dequeueing any pending updates for the servers specified by the cachegroup (id) and the cdn (id).
DequeueUpdateForServerWithTopologyCDN sets the config update time equal to the config apply time, thereby effectively dequeueing any pending updates for the servers specified by the topology (name) and the cdn (id).
DSRExistsWithXMLID returns whether or not an **open** Delivery Service Request with the given xmlid exists, and any error that occurred.
GetCacheGroupNameFromID Get Cache Group name from a given ID.
GetCapabilitiesFromRoleID returns the capabilities for the supplied role ID.
GetCapabilitiesFromRoleName returns the capabilities for the supplied role name.
GetCDNDomainFromName returns the domain, whether the cdn exists, and any error.
No description provided by the author
GetCDNIDFromFedID returns the ID of the CDN for the current federation.
GetCDNIDFromName returns the ID of the CDN if a CDN with the name exists.
GetCDNIDFromFedResolverID returns the IDs of the CDNs that the fed resolver is associated with.
GetCDNNameDomain returns the name and domain for a given CDN ID.
GetCDNNameFromDSXMLID returns the CDN name of the DS associated with the supplied XML ID.
GetCDNNameFromID gets the CDN name from the given CDN ID.
GetCDNNameFromProfileID returns the cdn name for the provided profile ID.
GetCDNNameFromProfileName returns the cdn name for the provided profile name.
GetCDNNameFromServerID gets the CDN name for the server with the given ID.
GetCDNNamesFromDSIds returns a list of cdn names for a list of DS IDs.
GetCDNNamesFromProfileIDs returns a list of cdn names for a list of profile IDs.
GetCDNNamesFromServerIds returns a list of cdn names for a list of server IDs.
No description provided by the author
GetCommonServerPropertiesFromV4 converts ServerV40 to CommonServerProperties struct.
GetDeliveryServiceCDNsByTopology returns a slice of CDN IDs for all delivery services assigned to the given topology.
GetDeliveryServicesWithTopologies returns a list containing the delivery services in the given dsIDs list that have a topology assigned.
GetDeliveryServiceTypeAndCDNName returns the type and the CDN name of the deliveryservice.
GetDeliveryServiceTypeAndTopology returns the type of the deliveryservice and the name of its topology.
GetDSCDNIdFromID loads the DeliveryService's cdn ID from the database, from the delivery service ID.
GetDSIDAndCDNFromName returns the delivery service ID and cdn name given from the delivery service name, whether a result existed, and any error.
GetDSIDFromStaticDNSEntry returns the delivery service ID associated with the static DNS entry.
GetDSNameFromID loads the DeliveryService's xml_id from the database, from the ID.
returns returns the delivery service name and cdn, whether it existed, and any error.
GetDSNameFromID loads the DeliveryService's xml_id from the database, from the ID.
GetDSRequiredCapabilitiesFromID returns the server's capabilities.
GetDSTenantIDFromXMLID fetches the ID of the Tenant to whom the Delivery Service identified by the the provided XMLID belongs.
GetFederationIDForUserIDByXMLID retrieves the ID of the Federation assigned to the user defined by userID on the Delivery Service identified by xmlid.
GetFederationNameFromID returns the federation's name, whether a federation with ID exists, or any error.
GetFederationResolversByFederationID fetches all of the federation resolvers currently assigned to a federation.
GetGlobalParams returns the value of the global param, whether it existed, or any error.
GetParam returns the value of the param, whether it existed, or any error.
GetParamNameByID returns the name of the param, whether it existed, or any error.
GetPrivLevelFromRole returns the priv_level associated with a role, whether it exists, and any error.
GetPrivLevelFromRoleID returns the priv_level associated with a role, whether it exists, and any error.
GetProfileIDDesc gets profile ID and desc for V3 servers.
GetProfileIDFromName returns the profile's ID, whether a profile with name exists, or any error.
GetProfileNameFromID returns the profile's name, whether a profile with ID exists, or any error.
GetRegionNameFromID returns the name of the region associated with the supplied ID.
GetRequiredCapabilitiesOfDeliveryServices gets all of the required capabilities of the given delivery service IDs.
GetRoleIDFromName returns the ID of the role associated with the supplied name.
GetServerCapabilitiesFromName returns the server's capabilities.
GetServerCapabilitiesOfServers gets all of the server capabilities of the given server hostnames.
GetServerDetailFromV4 function converts server details from V4 to V3.
GetServerDSNamesByCDN returns a map of ONLINE/REPORTED/ADMIN_DOWN cache names to slice of strings which are the XML IDs of the active, non-ANYMAP delivery services to which the cache is assigned in the given CDN.
GetServerIDFromName gets server id from a given name.
GetServerIDsFromCachegroupNames returns a list of servers IDs for a list of cachegroup IDs.
GetServerInfo returns a ServerInfo struct, whether the server exists, and an error (if one occurs).
GetServerInfosFromHostNames returns the ServerInfo structs of the given server host names or an error if any occur.
GetServerInfosFromIDs returns the ServerInfo structs of the given server IDs or an error if any occur.
No description provided by the author
GetServerInterfaces, given the IDs of one or more servers, returns all of their network interfaces mapped by their ids, or an error if one occurs during retrieval.
GetStatusByID returns a Status struct, a bool for whether or not a status of the given ID exists, and an error (if one occurs).
GetStatusByName returns a Status struct, a bool for whether or not a status of the given name exists, and an error (if one occurs).
GetTopologyCachegroups returns an array of cachegroup IDs and an array of cachegroup names for the given topology, or any error.
GetTypeIDByName reports the id of the type and whether or not a type exists with the given name.
GetUserByEmail retrieves the user with the given email.
GetUserByID returns the user with the requested ID if one exists.
QueueRevalForServer sets the revalidate update time for the server to now.
QueueUpdateForServer sets the config update time for the server to now.
QueueUpdateForServerWithCachegroupCDN sets the config update time for all servers belonging to the specified cachegroup (id) and cdn (id).
QueueUpdateForServerWithTopologyCDN sets the config update time for all servers within the specific topology (name) and cdn (id).
RoleExists returns whether or not the role with the given roleName exists, and any error that occurred.
ScanCachegroupsServerCapabilities, given rows of (server ID, CDN ID, cachegroup name, server capabilities), returns a map of cachegroup names to server IDs, a map of server IDs to a map of their capabilities, a map of server IDs to CDN IDs, and an error (if one occurs).
SetApplyRevalForServer sets the revalidate apply time for the server to now.
SetApplyRevalForServerWithTime sets the revalidate apply time for the server to the provided time.
SetApplyUpdateForServer sets the config apply time for the server to now.
SetApplyUpdateForServerWithTime sets the config apply time for the server to the provided time.
TopologyExists checks if a Topology with the given name exists.
UpdateServerProfilesForV4 updates server_profile table via update function for APIv4.
UpdateServerProfileTableForV3 updates CommonServerPropertiesV40 struct and server_profile table via Update (server) function for API v3.
UsernameExists reports whether or not the the given username exists as a user in the database to which the passed transaction refers.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author