v1payload

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Msg string `json:"error"`
}

Error is the error returned by the authentication server.

func (Error) Cause

func (e Error) Cause() error

Cause is implemented to be compatible with the pkg/errors package.

func (Error) Error

func (e Error) Error() string

Error returns the error message.

type GetClusterOutput added in v1.0.0

type GetClusterOutput struct {
	URL        string `json:"url"`
	ShortName  string `json:"short_name"`
	Name       string `json:"name"`
	Namespaces []struct {
		Name string `json:"name"`
	} `json:"namespaces"`
	ServiceType   string `json:"service_type"`
	ServiceURL    string `json:"service_url"`
	CaCertificate string `json:"ca_certificate"`
	Capacity      struct {
		CPU    float64 `json:"cpu"`
		Memory float64 `json:"memory"`
		Pods   int     `json:"pods"`
	} `json:"capacity"`
	Usage struct {
		CPU    float64 `json:"cpu"`
		Memory float64 `json:"memory"`
		Pods   int     `json:"pods"`
	} `json:"usage"`
	KubeConfigUser struct {
		Token        string `json:"token"`
		AuthProvider struct {
			Config struct {
				IdpIssuerURL string `json:"idp-issuer-url"`
				ClientID     string `json:"client-id"`
				RefreshToken string `json:"refresh-token"`
				IDToken      string `json:"id-token"`
			} `json:"config"`
			Name string `json:"name"`
		} `json:"auth-provider"`
	} `json:"kubeconfig_user"`
}

GetClusterOutput get some details of a specific cluster. Useful to setup kube config.

type GetJWTOutput

type GetJWTOutput struct {
	Token string `json:"token"`
}

GetJWTOutput is output when a JWT is requested

type GetOAuthCredentialsInput

type GetOAuthCredentialsInput struct {
	Code        string `url:"code"`
	ClientID    string `url:"client_id"`
	RedirectURI string `url:"redirect_uri"`
	GrantType   string `url:"grant_type"`
}

GetOAuthCredentialsInput is input for getting oauth credentials

type GetOAuthCredentialsOutput

type GetOAuthCredentialsOutput struct {
	OAuthCredentials
}

GetOAuthCredentialsOutput is output when getting oauth credentials

type GetProjectOutput added in v1.0.0

type GetProjectOutput struct {
	ID       int    `json:"id"`
	URL      string `json:"url"`
	Nk       string `json:"nk"`
	Name     string `json:"name"`
	Slug     string `json:"slug"`
	Services struct {
		Cluster struct {
			URL        string `json:"url"`
			ID         int    `json:"id"`
			Name       string `json:"name"`
			Address    string `json:"address"`
			Subaddress string `json:"subaddress"`
			B64CaData  string `json:"b64_ca_data"`
			Default    bool   `json:"default"`
		} `json:"cluster"`
	} `json:"services"`
	CreatedAt time.Time `json:"created_at"`
}

GetProjectOutput get some details of a specific project. Useful to setup kube config.

type GetWorkerJWTOutput

type GetWorkerJWTOutput struct {
	Token  string `json:"token"`
	Secret string `json:"secret"`
}

GetWorkerJWTOutput is output when a worker JWT (JWT + RefreshToken) is requested

type ListClustersOutput added in v1.0.0

type ListClustersOutput struct {
	Clusters []*GetClusterOutput
}

ListClustersOutput contains a list of projects

type ListProjectsOutput

type ListProjectsOutput struct {
	Projects []*GetProjectOutput
}

ListProjectsOutput contains a list of projects

type OAuthCredentials

type OAuthCredentials struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    int    `json:"expires_in"`
	Scope        string `json:"scope,omitempty"`
	TokenType    string `json:"token_type,omitempty"`
	IDToken      string `json:"id_token"`
}

OAuthCredentials represents the OAuth access tokens

type Project

type Project struct {
	ID   int    `json:"id"`
	URL  string `json:"url"`
	Slug string `json:"slug"`
}

Project represents a project

type RefreshOAuthCredentialsInput

type RefreshOAuthCredentialsInput struct {
	RefreshToken string `url:"refresh_token"`
	ClientID     string `url:"client_id"`
	GrantType    string `url:"grant_type"`
}

RefreshOAuthCredentialsInput is input for refreshing oauth credentials

type RefreshOAuthCredentialsOutput

type RefreshOAuthCredentialsOutput struct {
	OAuthCredentials
}

RefreshOAuthCredentialsOutput is output when refreshing oauth credentials

type RefreshWorkerJWTInput

type RefreshWorkerJWTInput struct {
	Token  string `json:"jwt"`
	Secret string `json:"secret"`
}

RefreshWorkerJWTInput is input for refreshing a JWT

type RefreshWorkerJWTOutput

type RefreshWorkerJWTOutput struct {
	Token string `json:"token"`
}

RefreshWorkerJWTOutput is output when a JWT refresh is requested

Jump to

Keyboard shortcuts

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