gateway

package
v0.0.0-...-b044b52 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenSigningSecretName  = "jwt-signing-key"
	TokenSigningSecretField = "value"

	UserMetadataFieldName = "username"
)
View Source
const (
	LabelKeyTerminalName = "terminal.marina.io/name"
	LabelKeyUsername     = "user.marina.io/username"
)
View Source
const (
	DefaultNamespace string = "marina-system"
)
View Source
const (
	DefaultRoleName = "marina-user"
)

Variables

This section is empty.

Functions

func LoggingInterceptor

func LoggingInterceptor(l *slog.Logger) grpc.UnaryServerInterceptor

Types

type Gateway

func NewGateway

func NewGateway(opts ...Option) (*Gateway, error)

func (*Gateway) Bootstrap

func (g *Gateway) Bootstrap(ctx context.Context) error

func (*Gateway) Check

Check implements grpc_health_v1.HealthServer.

func (*Gateway) CreateUser

func (g *Gateway) CreateUser(ctx context.Context, req *user.UserCreateRequest) (*emptypb.Empty, error)

func (*Gateway) DeleteTerminal

func (g *Gateway) DeleteTerminal(ctx context.Context, req *terminal.TerminalDeleteRequest) (*empty.Empty, error)

func (*Gateway) DeleteUser

func (g *Gateway) DeleteUser(ctx context.Context, req *user.UserDeleteRequest) (*emptypb.Empty, error)

func (*Gateway) GetUser

func (g *Gateway) GetUser(ctx context.Context, req *user.UserGetRequest) (*user.User, error)

func (*Gateway) ListUser

func (*Gateway) Login

func (g *Gateway) Login(ctx context.Context, req *auth.LoginRequest) (*auth.LoginResponse, error)

func (*Gateway) Register

func (g *Gateway) Register(s *grpc.Server)

func (*Gateway) TokenAuthInterceptor

func (g *Gateway) TokenAuthInterceptor() grpc.UnaryServerInterceptor

func (*Gateway) UpdateUser

func (g *Gateway) UpdateUser(ctx context.Context, req *user.UserUpdateRequest) (*emptypb.Empty, error)

func (*Gateway) Watch

Watch implements grpc_health_v1.HealthServer.

type Option

type Option func(*Gateway)

func WithAccessList

func WithAccessList(imagesAccessList images.ImagesAccessList) Option

func WithAuthDriver

func WithAuthDriver(driver auth.Driver) Option

func WithKubeConfig

func WithKubeConfig(config *rest.Config) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

func WithNamespace

func WithNamespace(namespace string) Option

Directories

Path Synopsis
api
drivers

Jump to

Keyboard shortcuts

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