server

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Overview

Copyright The Guard Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The Guard Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	ServingPort = 8443
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRecommendedOptions

type AuthRecommendedOptions struct {
	SecureServing SecureServingOptions
	NTP           NTPOptions
	Github        github.Options
	Gitlab        gitlab.Options
	Token         token.Options
	Google        google.Options
	Azure         azure.Options
	LDAP          ldap.Options
	AuthProvider  providers.AuthProviders
}

func NewAuthRecommendedOptions

func NewAuthRecommendedOptions() *AuthRecommendedOptions

func (*AuthRecommendedOptions) AddFlags

func (o *AuthRecommendedOptions) AddFlags(fs *pflag.FlagSet)

func (*AuthRecommendedOptions) Validate

func (o *AuthRecommendedOptions) Validate() []error

type AuthzRecommendedOptions

type AuthzRecommendedOptions struct {
	Azure         options.Options
	AuthzProvider authz.AuthzProviders
}

func NewAuthzRecommendedOptions

func NewAuthzRecommendedOptions() *AuthzRecommendedOptions

func (*AuthzRecommendedOptions) AddFlags

func (o *AuthzRecommendedOptions) AddFlags(fs *pflag.FlagSet)

func (*AuthzRecommendedOptions) Validate

type Authzhandler

type Authzhandler struct {
	AuthRecommendedOptions  *AuthRecommendedOptions
	AuthzRecommendedOptions *AuthzRecommendedOptions
	Store                   authz.Store
	// contains filtered or unexported fields
}

func (*Authzhandler) ServeHTTP

func (s *Authzhandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type NTPOptions

type NTPOptions struct {
	NTPServer    string
	MaxClodkSkew time.Duration
	Interval     time.Duration
}

func NewNTPOptions

func NewNTPOptions() NTPOptions

func (*NTPOptions) AddFlags

func (o *NTPOptions) AddFlags(fs *pflag.FlagSet)

func (*NTPOptions) Enabled

func (o *NTPOptions) Enabled() bool

func (NTPOptions) ToArgs

func (o NTPOptions) ToArgs() []string

func (*NTPOptions) Validate

func (o *NTPOptions) Validate() []error

type SecureServingOptions

type SecureServingOptions struct {
	SecureAddr string
	CACertFile string
	CertFile   string
	KeyFile    string
	// contains filtered or unexported fields
}

func NewSecureServingOptions

func NewSecureServingOptions() SecureServingOptions

func NewSecureServingOptionsFromDir

func NewSecureServingOptionsFromDir(pkiDir string) SecureServingOptions

func (*SecureServingOptions) AddFlags

func (o *SecureServingOptions) AddFlags(fs *pflag.FlagSet)

func (SecureServingOptions) Apply

func (o SecureServingOptions) Apply(d *apps.Deployment) (extraObjs []runtime.Object, err error)

func (SecureServingOptions) UseTLS

func (o SecureServingOptions) UseTLS() bool

func (*SecureServingOptions) Validate

func (o *SecureServingOptions) Validate() []error

type Server

type Server struct {
	AuthRecommendedOptions  *AuthRecommendedOptions
	AuthzRecommendedOptions *AuthzRecommendedOptions
	TokenAuthenticator      *token.Authenticator
	WriteTimeout            time.Duration
	ReadTimeout             time.Duration
}

func (*Server) AddFlags

func (s *Server) AddFlags(fs *pflag.FlagSet)

func (Server) ListenAndServe

func (s Server) ListenAndServe()

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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