api

package
v0.0.0-...-0b82c43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2016 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJWT

func CreateJWT(accessToken string, secret string) (string, error)

func SendGithubRequest

func SendGithubRequest(token string, client *http.Client, method, endpoint string, data []byte) ([]byte, error)

Types

type AuthResource

type AuthResource struct {
	JWTClaims
	kv.KVClient
}

func (*AuthResource) Register

func (a *AuthResource) Register(container *restful.Container)

type AuthResponse

type AuthResponse struct {
	JWT    string `json:"jwt"`
	UserID string `json:"user_id"`
}

type BuildResource

type BuildResource struct {
	kv.KVClient
	*mc.MinioClient
}

BuildResource defines the endpoints for builds

type DashboardPayload

type DashboardPayload struct {
	Author string `json:"author"`
}

DashboardPayload contains the data expected from a build hook coming from the dashboard

type Error

type Error struct {
	Code    int    `json:"Code"`
	Message string `json:"Message"`
}

type GithubAuthResponse

type GithubAuthResponse struct {
	AccessToken string `json:"access_token"`
}

type GithubUser

type GithubUser struct {
	Login string `json:"login"`
	ID    int    `json:"id"`
}

func GetGithubUser

func GetGithubUser(token string) (*GithubUser, error)

type JWTClaims

type JWTClaims struct {
	GithubAccessToken string
}

JWTClaims contains the claims from the jwt

type PipelineResource

type PipelineResource struct {
	kv.KVClient
	*mc.MinioClient
	kube.KubeClient
}

PipelineResource defines the endpoints of a Pipeline

func (*PipelineResource) Register

func (p *PipelineResource) Register(container *restful.Container)

Register registers the endpoint of this resource to the container

type RepositoryResource

type RepositoryResource struct{}

RepositoryResource defines the endpoints to access the git repositories

func (*RepositoryResource) Register

func (r *RepositoryResource) Register(container *restful.Container)

Register registers the endpoints to the container

type StageResource

type StageResource struct {
	kv.KVClient
	*mc.MinioClient
	kube.KubeClient
}

StageResource defines the endpoints for build stages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL