Documentation ¶
Overview ¶
Package server provides tools for manipulating the server database table and corresponding http handlers.
Index ¶
- Constants
- func AddWhereClauseAndQuery(tx *sql.Tx, q string, hostName string, physLocationID int, orderByStr string, ...) (*sql.Rows, error)
- func AssignDeliveryServicesToServerHandler(w http.ResponseWriter, r *http.Request)
- func Create(w http.ResponseWriter, r *http.Request)
- func Delete(w http.ResponseWriter, r *http.Request)
- func GetDetailParamHandler(w http.ResponseWriter, r *http.Request)
- func GetServerUpdateStatusHandler(w http.ResponseWriter, r *http.Request)
- func InvalidStatusForDeliveryServicesAlertText(prefix, serverType string, dsIDs []int) string
- func QueueUpdateHandler(w http.ResponseWriter, r *http.Request)
- func Read(w http.ResponseWriter, r *http.Request)
- func Update(w http.ResponseWriter, r *http.Request)
- func UpdateHandler(w http.ResponseWriter, r *http.Request)
- func UpdateStatusHandler(w http.ResponseWriter, r *http.Request)
- func ValidateDSCapabilities(dsIDs []int, serverName string, tx *sql.Tx) (error, error, int)
- type DSTenant
- type TOServerServerCapability
- func (ssc *TOServerServerCapability) Create() (error, error, int)
- func (ssc *TOServerServerCapability) Delete() (error, error, int)
- func (ssc *TOServerServerCapability) DeleteQuery() string
- func (ssc *TOServerServerCapability) GetAuditName() string
- func (ssc TOServerServerCapability) GetKeyFieldsInfo() []api.KeyFieldInfo
- func (ssc TOServerServerCapability) GetKeys() (map[string]interface{}, bool)
- func (ssc *TOServerServerCapability) GetType() string
- func (ssc *TOServerServerCapability) NewReadObj() interface{}
- func (ssc *TOServerServerCapability) ParamColumns() map[string]dbhelpers.WhereColumnInfo
- func (ssc *TOServerServerCapability) Read(h http.Header, useIMS bool) ([]interface{}, error, error, int, *time.Time)
- func (v *TOServerServerCapability) SelectMaxLastUpdatedQuery(where, orderBy, pagination, tableName string) string
- func (ssc *TOServerServerCapability) SelectQuery() string
- func (ssc *TOServerServerCapability) SetKeys(keys map[string]interface{})
- func (ssc *TOServerServerCapability) SetLastUpdated(t tc.TimeNoMod)
- func (ssc TOServerServerCapability) Validate() error
Constants ¶
const ( ServerCapabilityQueryParam = "serverCapability" ServerQueryParam = "serverId" ServerHostNameQueryParam = "serverHostName" )
Variables ¶
This section is empty.
Functions ¶
func AddWhereClauseAndQuery ¶
func AssignDeliveryServicesToServerHandler ¶
func AssignDeliveryServicesToServerHandler(w http.ResponseWriter, r *http.Request)
AssignDeliveryServicesToServerHandler is the handler for POST requests to /servers/{{ID}}/deliveryservices.
func Create ¶
func Create(w http.ResponseWriter, r *http.Request)
Create is the handler for POST requests to /servers.
func Delete ¶
func Delete(w http.ResponseWriter, r *http.Request)
Delete is the handler for DELETE requests to the /servers API endpoint.
func GetDetailParamHandler ¶
func GetDetailParamHandler(w http.ResponseWriter, r *http.Request)
func GetServerUpdateStatusHandler ¶
func GetServerUpdateStatusHandler(w http.ResponseWriter, r *http.Request)
func InvalidStatusForDeliveryServicesAlertText ¶
InvalidStatusForDeliveryServicesAlertText returns a string describing that setting a server to 'status' invalidates the Active delivery services identified in 'dsIDs'.
If 'dsIDs' is empty/nil, returns an empty string.
func QueueUpdateHandler ¶
func QueueUpdateHandler(w http.ResponseWriter, r *http.Request)
QueueUpdateHandler implements an http handler that updates a server's upd_pending value.
func Read ¶
func Read(w http.ResponseWriter, r *http.Request)
Read is the handler for GET requests to /servers.
func Update ¶
func Update(w http.ResponseWriter, r *http.Request)
Update is the handler for PUT requests to /servers.
func UpdateHandler ¶
func UpdateHandler(w http.ResponseWriter, r *http.Request)
UpdateHandler implements an http handler that updates a server's upd_pending and reval_pending values.
func UpdateStatusHandler ¶
func UpdateStatusHandler(w http.ResponseWriter, r *http.Request)
UpdateStatusHandler is the handler for PUT requests to the /servers/{{ID}}/status API endpoint.
Types ¶
type TOServerServerCapability ¶
type TOServerServerCapability struct { api.APIInfoImpl `json:"-"` tc.ServerServerCapability }
func (*TOServerServerCapability) Create ¶
func (ssc *TOServerServerCapability) Create() (error, error, int)
func (*TOServerServerCapability) Delete ¶
func (ssc *TOServerServerCapability) Delete() (error, error, int)
func (*TOServerServerCapability) DeleteQuery ¶
func (ssc *TOServerServerCapability) DeleteQuery() string
func (*TOServerServerCapability) GetAuditName ¶
func (ssc *TOServerServerCapability) GetAuditName() string
func (TOServerServerCapability) GetKeyFieldsInfo ¶
func (ssc TOServerServerCapability) GetKeyFieldsInfo() []api.KeyFieldInfo
func (TOServerServerCapability) GetKeys ¶
func (ssc TOServerServerCapability) GetKeys() (map[string]interface{}, bool)
Need to satisfy Identifier interface but is a no-op as path does not have Update
func (*TOServerServerCapability) GetType ¶
func (ssc *TOServerServerCapability) GetType() string
func (*TOServerServerCapability) NewReadObj ¶
func (ssc *TOServerServerCapability) NewReadObj() interface{}
func (*TOServerServerCapability) ParamColumns ¶
func (ssc *TOServerServerCapability) ParamColumns() map[string]dbhelpers.WhereColumnInfo
func (*TOServerServerCapability) SelectMaxLastUpdatedQuery ¶
func (v *TOServerServerCapability) SelectMaxLastUpdatedQuery(where, orderBy, pagination, tableName string) string
func (*TOServerServerCapability) SelectQuery ¶
func (ssc *TOServerServerCapability) SelectQuery() string
func (*TOServerServerCapability) SetKeys ¶
func (ssc *TOServerServerCapability) SetKeys(keys map[string]interface{})
func (*TOServerServerCapability) SetLastUpdated ¶
func (ssc *TOServerServerCapability) SetLastUpdated(t tc.TimeNoMod)
func (TOServerServerCapability) Validate ¶
func (ssc TOServerServerCapability) Validate() error
Validate fulfills the api.Validator interface