gateway

package
v0.0.0-...-0687549 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

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

	UserAccessFieldKeyName = "user-access-list"
)
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) CreateTerminal

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

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 WithAuthDriver

func WithAuthDriver(driver auth.Driver) Option

func WithKubeClient

func WithKubeClient(client client.Client) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

func WithNamespace

func WithNamespace(namespace string) Option

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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