server

package
v0.8.1-rc.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MPL-2.0 Imports: 36 Imported by: 3

Documentation

Index

Constants

View Source
const (
	OctetStreamType = "application/octet-stream"
	JsonType        = "application/json"
)
View Source
const DefaultHost = "0.0.0.0"
View Source
const DefaultPort = "9001"

Variables

View Source
var (
	ErrEmptyAccessToken = errors.New("access token is empty")
	ErrBadProvider      = errors.New("wrong provider name")
)
View Source
var (
	PublicRoutes = []string{
		"/v1/featureflags",
	}
)

Functions

func NewApplicationsServer

func NewApplicationsServer(cfg *ApplicationsConfig, setters ...ApplicationsOption) pb.ApplicationsServer

NewApplicationsServer creates a grpc Applications server

func NewHandlers added in v0.6.0

func NewHandlers(ctx context.Context, log logr.Logger, cfg *Config) (http.Handler, error)

func NewProfilesServer added in v0.6.0

func NewProfilesServer(log logr.Logger, config ProfilesConfig) pb.ProfilesServer

Types

type ApplicationsConfig added in v0.2.3

type ApplicationsConfig struct {
	Logger           logr.Logger
	Factory          services.Factory
	JwtClient        auth.JWTClient
	GithubAuthClient auth.GithubAuthClient
	GitlabAuthClient auth.GitlabAuthClient
	ClusterConfig    kube.ClusterConfig
}

An ApplicationsConfig allows for the customization of an ApplicationsServer. Use the DefaultConfig() to use the default dependencies.

func DefaultApplicationsConfig added in v0.6.0

func DefaultApplicationsConfig(log logr.Logger) (*ApplicationsConfig, error)

DefaultApplicationsConfig creates a populated config with the dependencies for a Server

type ApplicationsOption added in v0.6.1

type ApplicationsOption func(*ApplicationsOptions)

ApplicationsOption defines the signature of a function that can be used to set an option for an ApplicationsServer.

func WithClientGetter added in v0.6.1

func WithClientGetter(clientGetter kube.ClientGetter) ApplicationsOption

WithClientGetter allows for setting a ClientGetter.

type ApplicationsOptions added in v0.6.1

type ApplicationsOptions struct {
	ClientGetter kube.ClientGetter
}

ApplicationsOptions includes all the options that can be set for an ApplicationsServer.

type Config added in v0.6.0

type Config struct {
	AppConfig        *ApplicationsConfig
	AppOptions       []ApplicationsOption
	CoreServerConfig core.CoreServerConfig
	AuthServer       *auth.AuthServer
}

type ProfilesConfig added in v0.6.0

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

func NewProfilesConfig added in v0.6.0

func NewProfilesConfig(clusterConfig kube.ClusterConfig, helmCache cache.Cache, helmRepoNamespace, helmRepoName string) ProfilesConfig

type ProfilesServer added in v0.6.0

type ProfilesServer struct {
	pb.UnimplementedProfilesServer

	Log               logr.Logger
	HelmRepoName      string
	HelmRepoNamespace string
	HelmCache         cache.Cache
	ClientGetter      kube.ClientGetter
}

func (*ProfilesServer) GetProfileValues added in v0.6.0

func (s *ProfilesServer) GetProfileValues(ctx context.Context, msg *pb.GetProfileValuesRequest) (*httpbody.HttpBody, error)

func (*ProfilesServer) GetProfiles added in v0.6.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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