Documentation ¶
Index ¶
- func GetenvOrDefault(envVar, defaultVal string) string
- func IsGitHubFileNotFoundErr(errString string) bool
- func ReadJSON(reader io.Reader, dest interface{}) error
- func WriteHTTPError(w http.ResponseWriter, code int, err error)
- func WriteJSON(obj interface{}, w http.ResponseWriter)
- type GitHubFileNotFoundErr
- type GithubRateLimitErr
- type PlankClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetenvOrDefault ¶
GetenvOrDefault will return the value of the given enrvironment variable, or, if it's blank, will return the defaultVal.
func IsGitHubFileNotFoundErr ¶
func ReadJSON ¶
ReadJSON takes a json byte stream from a reader and decodes it into the struct passed in.
func WriteHTTPError ¶
func WriteHTTPError(w http.ResponseWriter, code int, err error)
WriteHTTPError writes an HTTP error to an http.ResponseWriter
func WriteJSON ¶
func WriteJSON(obj interface{}, w http.ResponseWriter)
WriteJSON encodes an object to a json string and writes it to the writer.
Types ¶
type GitHubFileNotFoundErr ¶
func (*GitHubFileNotFoundErr) Error ¶
func (e *GitHubFileNotFoundErr) Error() string
type GithubRateLimitErr ¶
func (*GithubRateLimitErr) Error ¶
func (e *GithubRateLimitErr) Error() string
type PlankClient ¶
type PlankClient interface { GetApplication(string) (*plank.Application, error) CreateApplication(*plank.Application) error GetPipelines(string) ([]plank.Pipeline, error) DeletePipeline(plank.Pipeline) error UpsertPipeline(plank.Pipeline, string) error ResyncFiat() error ArmoryEndpointsEnabled() bool EnableArmoryEndpoints() }
Click to show internal directories.
Click to hide internal directories.