Documentation ¶
Index ¶
- func DeleteNullKeysFromObjectMeta(obj *metav1.ObjectMeta)
- func GenAdler32Hash(text string) string
- func GenerateNewJwtToken(key, customer, org string, tokenType platform.TokenType, exp time.Time) (string, error)
- func StatusBadRequest(msg string, obj runtime.Object, reason metav1.StatusReason) *metav1.Status
- func StatusConflict(msg string, obj runtime.Object, details *metav1.StatusDetails) *metav1.Status
- func StatusForbidden(msg string, obj runtime.Object, reason metav1.StatusReason) *metav1.Status
- func StatusInternalError(msg string, obj runtime.Object) *metav1.Status
- func StatusMethodNotAllowed(msg string, obj runtime.Object) *metav1.Status
- func StatusNotFound(msg string, obj runtime.Object) *metav1.Status
- func StatusUnauthorized(msg string, obj runtime.Object, reason metav1.StatusReason) *metav1.Status
- func StatusUnprocessableEntity(msg string, obj runtime.Object, details *metav1.StatusDetails) *metav1.Status
- func StrategicMergePatch(codec runtime.Codec, original, new runtime.Object) ([]byte, error)
- func WriteResponseCreated(w http.ResponseWriter, data []byte)
- func WriteResponseError(w http.ResponseWriter, status *metav1.Status)
- func WriteResponseNoContent(w http.ResponseWriter)
- func WriteResponseSuccess(w http.ResponseWriter, data []byte)
- type Decoder
- type ErrInvalidGitSha
- type SHA
- type SlugBuilderInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteNullKeysFromObjectMeta ¶
func DeleteNullKeysFromObjectMeta(obj *metav1.ObjectMeta)
DeleteNullKeysFromObjectMeta will remove any key with an empty string in .metadata.labels and .metadata.annotations
func GenAdler32Hash ¶
GenAdler32Hash generates a adler32 hash from a given string
func GenerateNewJwtToken ¶
func GenerateNewJwtToken(key, customer, org string, tokenType platform.TokenType, exp time.Time) (string, error)
GenerateNewJwtToken creates a new user token to allow machine-to-machine interaction
func StatusBadRequest ¶
StatusBadRequest returns a *metav1.Status with 400 status code
func StatusConflict ¶
StatusConflict returns a *metav1.Status with 409 status code
func StatusForbidden ¶
StatusForbidden returns a *metav1.Status with 403 status code
func StatusInternalError ¶
StatusInternalError returns a *metav1.Status with 500 status code
func StatusMethodNotAllowed ¶
StatusMethodNotAllowed returns a *metav1.Status with 405 status code
func StatusNotFound ¶
StatusNotFound returns a *metav1.Status with 404 status code
func StatusUnauthorized ¶
StatusUnauthorized returns a *metav1.Status with 401 status code
func StatusUnprocessableEntity ¶
func StatusUnprocessableEntity(msg string, obj runtime.Object, details *metav1.StatusDetails) *metav1.Status
StatusUnprocessableEntity returns a *metav1.Status with 422 status code
func StrategicMergePatch ¶
StrategicMergePatch creates a strategic merge patch and merge with the original object https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md
func WriteResponseCreated ¶
func WriteResponseCreated(w http.ResponseWriter, data []byte)
func WriteResponseError ¶
func WriteResponseError(w http.ResponseWriter, status *metav1.Status)
func WriteResponseNoContent ¶
func WriteResponseNoContent(w http.ResponseWriter)
func WriteResponseSuccess ¶
func WriteResponseSuccess(w http.ResponseWriter, data []byte)
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder known how to decode a io.Reader into a Kubernetes resource
func NewDecoder ¶
NewDecoder creates a new Decoder
type ErrInvalidGitSha ¶
type ErrInvalidGitSha struct {
// contains filtered or unexported fields
}
ErrInvalidGitSha is returned by NewSha if the given raw sha is invalid for any reason.
func (ErrInvalidGitSha) Error ¶
func (e ErrInvalidGitSha) Error() string
Error is the error interface implementation.
type SHA ¶
type SHA struct {
// contains filtered or unexported fields
}
SHA is the representaton of a git sha
type SlugBuilderInfo ¶
type SlugBuilderInfo struct {
// contains filtered or unexported fields
}
SlugBuilderInfo contains all of the object storage related information needed to pass to a slug builder.
func NewSlugBuilderInfo ¶
func NewSlugBuilderInfo(namespace, deployName, prefix string, sha *SHA) *SlugBuilderInfo
NewSlugBuilderInfo creates and populates a new SlugBuilderInfo based on the given data
func (SlugBuilderInfo) PushKey ¶
func (s SlugBuilderInfo) PushKey() string
PushKey returns the object storage key that the slug builder will store the slug in. The returned value only contains the path to the folder, not including the final filename.
func (SlugBuilderInfo) TarKey ¶
func (s SlugBuilderInfo) TarKey() string
TarKey returns the object storage key from which the slug builder will download for the tarball (from which it uses to build the slug). The returned value only contains the path to the folder, not including the final filename.