Documentation
¶
Index ¶
Constants ¶
const APIVersion = "brigade.sh/v2"
APIVersion represents the API and major version thereof with which this version of the Brigade SDK is compatible.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrAuthentication ¶
type ErrAuthentication struct { // Reason is a natural language explanation for why authentication failed. Reason string `json:"reason,omitempty"` }
ErrAuthentication represents an error asserting a principal's identity.
func (*ErrAuthentication) Error ¶
func (e *ErrAuthentication) Error() string
type ErrAuthorization ¶
type ErrAuthorization struct{}
ErrAuthorization represents an error wherein a principal was not authorized to perform the requested operation.
func (*ErrAuthorization) Error ¶
func (e *ErrAuthorization) Error() string
type ErrBadRequest ¶
type ErrBadRequest struct { // Reason is a natural language explanation for why the request is invalid. Reason string `json:"reason,omitempty"` // Details may further qualify why a request is invalid. For instance, if // the Reason field states that request validation failed, the Details field, // may enumerate specific request schema violations. Details []string `json:"details,omitempty"` }
ErrBadRequest represents an error wherein an invalid request has been rejected by the API server.
func (*ErrBadRequest) Error ¶
func (e *ErrBadRequest) Error() string
type ErrConflict ¶
type ErrConflict struct { // Type identifies the type of the resource that the conflict applies to. Type string `json:"type,omitempty"` // ID is the identifier of the resource that has encountered a conflict. ID string `json:"id,omitempty"` // Reason is a natural language explanation of the conflict. Reason string `json:"reason,omitempty"` }
ErrConflict represents an error wherein a request cannot be completed because it would violate some constraint of the system, for instance creating a new resource with an identifier already used by another resource of the same type.
func (*ErrConflict) Error ¶
func (e *ErrConflict) Error() string
type ErrInternalServer ¶
type ErrInternalServer struct{}
ErrInternalServer represents a condition wherein the API server has encountered an unexpected error and does not wish to communicate further details of that error to the client.
func (*ErrInternalServer) Error ¶
func (e *ErrInternalServer) Error() string
type ErrNotFound ¶
type ErrNotFound struct { // Type identifies the type of the resource that could not be located. Type string `json:"type,omitempty"` // ID is the identifier of the resource of type Type that could not be // located. ID string `json:"id,omitempty"` // Reason is a natural language explanation around why the resource could not // be located. Reason string `json:"reason,omitempty"` }
ErrNotFound represents an error wherein a resource presumed to exist could not be located.
func (*ErrNotFound) Error ¶
func (e *ErrNotFound) Error() string
type ErrNotSupported ¶
type ErrNotSupported struct { // Details is a natural language explanation of why the request was is not // supported by the API server. Details string `json:"reason,omitempty"` }
ErrNotSupported represents an error wherein a request cannot be completed because the API server explicitly does not support it. This can occur, for instance, if a client attempts to authenticate to the API server using an authentication mechanism that is explicitly disabled by the API server.
func (*ErrNotSupported) Error ¶
func (e *ErrNotSupported) Error() string
type ListMeta ¶
type ListMeta struct { // Continue, when non-empty, is an opaque value created by and understood by // an API operation that returns partial (pageable) results. Submitting this // value with subsequent requests to the same operation specifies to that // operation which page to return next. Continue string `json:"continue,omitempty"` // RemainingItemCount, when non-nil, indicates that an API operation returned // partial (pageable) results and indicates how many results remain. RemainingItemCount int64 `json:"remainingItemCount,omitempty"` }
ListMeta is metadata for ordered collections of resources.
type ListOptions ¶
type ListOptions struct { // Continue aids in pagination of long lists. It permits clients to echo an // opaque value obtained from a previous API call back to the API in a // subsequent call in order to indicate what resource was the last on the // previous page. Continue string // Limit aids in pagination of long lists. It permits clients to specify page // size when making API calls. The API server provides a default when a value // is not specified and may reject or override invalid values (non-positive) // numbers or very large page sizes. Limit int64 }
ListOptions represents useful resource selection criteria when fetching paginated lists of resources.
type ObjectMeta ¶
type ObjectMeta struct { // ID is an immutable resource identifier. ID string `json:"id,omitempty"` // Created indicates the time at which a resource was created. This is // recorded by the system. Clients must leave the value of this field set to // nil when using the API to create or update resources. Created *time.Time `json:"created,omitempty"` }
ObjectMeta represents metadata about an instance of a resource. The fields of this type are broadly applicable to most if not all resource types.
type TypeMeta ¶
type TypeMeta struct { // Kind specifies the type of a serialized resource. Kind string `json:"kind,omitempty"` // APIVersion specifies the major version of the Brigade API with which the // client or server having serialized the resource is compatible. APIVersion string `json:"apiVersion,omitempty"` }
TypeMeta represents metadata about a resource type to help clients and servers mutually head off potential confusion over types (and versions thereof) sent over the wire.