server

package
v6.0.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthLoginCallbackEndpoint = "/auth/callback"
	AuthLoginSuccessEndpoint  = "/"
	AuthLoginErrorEndpoint    = "/error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeConfigTmpl

type KubeConfigTmpl struct {
	// contains filtered or unexported fields
}

KubeConfigTmpl is a template which can be rendered into kubectl config file ready to talk to a tectonic installation.

func NewKubeConfigTmpl

func NewKubeConfigTmpl(clusterName, clientID, clientSecret, k8sURL, dexURL string, k8sCA, dexCA []byte) *KubeConfigTmpl

NewKubeConfigTmpl takes the necessary arguments required to create a KubeConfigTmpl.

func (*KubeConfigTmpl) Execute

func (k *KubeConfigTmpl) Execute(w io.Writer, idToken, refreshToken string) error

Execute renders a kubectl config file unqiue to an authentication session.

type ResourceLister

type ResourceLister struct {
	// The path at which the resources can be found under the Kubernetes API.
	ResourcesPath string

	// If the user's bearer token doesn't have the ability to list the resources, this
	// token is used instead to perform the list request. The user will still only
	// see the subset of resources they have access to.
	BearerToken string

	// Endpoint of the API server.
	K8sEndpoint string

	// A client with the correct TLS setup for communicating with the API server.
	// It should not use client credentials.
	Client *http.Client
}

ResourceLister determines the list of resources (of a particular kind) that a particular user can view.

type Server

type Server struct {
	K8sProxyConfig      *proxy.Config
	BaseURL             *url.URL
	PublicDir           string
	TectonicVersion     string
	TectonicLicenseFile string
	TectonicCACertFile  string
	Auther              *auth.Authenticator
	StaticUser          *auth.User
	KubectlClientID     string
	ClusterName         string
	KubeAPIServerURL    string
	OpenshiftConsoleURL string
	// Helpers for logging into kubectl and rendering kubeconfigs. These fields
	// may be nil.
	KubectlAuther                  *auth.Authenticator
	KubeConfigTmpl                 *KubeConfigTmpl
	DexClient                      api.DexClient
	NamespaceLister                *ResourceLister
	CustomResourceDefinitionLister *ResourceLister
}

func (*Server) HTTPHandler

func (s *Server) HTTPHandler() http.Handler

Jump to

Keyboard shortcuts

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