Documentation
¶
Overview ¶
Package schedulerapi contains request definitions for the Scheduler API. The definitions are not complete and can be extended as needed. Requests can be sent by any HTTP client that implements the client.Sender interface. It is necessary to set API host and "X-StorageApi-Token" header in the HTTP client, see the ClientWithHostAndToken function.
Index ¶
- func ActivateScheduleRequest(configID storageapi.ConfigID, configurationVersionID string) client.APIRequest[*Schedule]
- func CleanAllSchedulesRequest() client.APIRequest[client.NoResult]
- func ClientWithHostAndToken(c client.Client, apiHost, apiToken string) client.Client
- func DeleteScheduleRequest(key ScheduleKey) client.APIRequest[client.NoResult]
- func DeleteSchedulesForConfigurationRequest(configID ConfigID) client.APIRequest[client.NoResult]
- func ListSchedulesRequest() client.APIRequest[*[]*Schedule]
- type ConfigID
- type Error
- type Schedule
- type ScheduleID
- type ScheduleKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateScheduleRequest ¶
func ActivateScheduleRequest(configID storageapi.ConfigID, configurationVersionID string) client.APIRequest[*Schedule]
ActivateScheduleRequest https://app.swaggerhub.com/apis/odinuv/scheduler/1.0.0#/schedules/activate
func CleanAllSchedulesRequest ¶
func CleanAllSchedulesRequest() client.APIRequest[client.NoResult]
CleanAllSchedulesRequest cleans all schedules in whole project. Useful for E2E tests.
func ClientWithHostAndToken ¶
ClientWithHostAndToken returns HTTP client with api host set.
func DeleteScheduleRequest ¶
func DeleteScheduleRequest(key ScheduleKey) client.APIRequest[client.NoResult]
DeleteScheduleRequest https://app.swaggerhub.com/apis/odinuv/scheduler/1.0.0#/schedules/deleteSchedule
func DeleteSchedulesForConfigurationRequest ¶
func DeleteSchedulesForConfigurationRequest(configID ConfigID) client.APIRequest[client.NoResult]
DeleteSchedulesForConfigurationRequest https://app.swaggerhub.com/apis/odinuv/scheduler/1.0.0#/schedules/deleteSchedulesForConfiguration
func ListSchedulesRequest ¶
func ListSchedulesRequest() client.APIRequest[*[]*Schedule]
ListSchedulesRequest https://app.swaggerhub.com/apis/odinuv/scheduler/1.0.0#/schedules/get_schedules
Types ¶
type ConfigID ¶
type ConfigID = storageapi.ConfigID
ConfigID is ID of a configuration in Storage API.
type Error ¶
type Error struct { Message string `json:"error"` ErrCode int `json:"code"` ExceptionID string `json:"exceptionId"` // contains filtered or unexported fields }
Error represents the structure Scheduler API error.
func (Error) ErrorExceptionID ¶
ErrorExceptionID returns exception ID to find details in logs.
func (Error) ErrorUserMessage ¶
ErrorUserMessage returns error message for end user.
func (*Error) SetRequest ¶
SetRequest method allows injection of HTTP request to the error, it implements client.errorWithRequest.
func (*Error) SetResponse ¶
SetResponse method allows injection of HTTP response to the error, it implements client.errorWithResponse.
type Schedule ¶
type Schedule struct { ScheduleKey ConfigID ConfigID `json:"configurationId"` }
Schedule - https://app.swaggerhub.com/apis/odinuv/scheduler/1.0.0#/schedules/get_schedules
type ScheduleID ¶
type ScheduleID string
ScheduleID is ID of a schedule in Scheduler API.
func (ScheduleID) String ¶
func (v ScheduleID) String() string
type ScheduleKey ¶
type ScheduleKey struct {
ID ScheduleID `json:"id" validate:"required"`
}
ScheduleKey is a unique identifier of a schedule.