Documentation
¶
Index ¶
Constants ¶
View Source
const ( // StateTypeError is used for states of type error StateTypeError = 0 // StateTypeOK is used for states of type OK StateTypeOK = 1 // StateTypePending is used for states of type Pending StateTypePending = 2 )
State types defined for GS resources by the Engine
Variables ¶
View Source
var ( // ErrStateError is returned if a resource could not be provisioned (state "Error") ErrStateError = errors.New("resource is in an error state") // ErrStateUnknown is returned if a resource has an unknown state ErrStateUnknown = errors.New("resource is in an unknown state") )
Functions ¶
Types ¶
type GenericService ¶
type GenericService struct{}
GenericService has methods overridden for all GS objects in the same way
func (*GenericService) FilterAPIResponse ¶
func (gs *GenericService) FilterAPIResponse(ctx context.Context, res *http.Response) (*http.Response, error)
FilterAPIResponse replaces the API response with an empty json object
type HasState ¶
type HasState struct {
State State `json:"state"`
}
func (HasState) StateError ¶
StateError checks if the state is marking any failure
func (HasState) StatePending ¶
StatePending checks if the state is marking any change currently being applied
type State ¶
type State struct { // programatically usable enum value ID string `json:"id"` // human readable status text Text string `json:"text"` Type int `json:"type"` }
State represents the state object available on GS resources
func (State) MarshalJSON ¶
func (State) StateError ¶
StateError checks if the state is marking any failure
func (State) StatePending ¶
StatePending checks if the state is marking any change currently being applied
type StateRetriever ¶
StateRetriever is an interface Objects can implement to provide unified state information
Click to show internal directories.
Click to hide internal directories.