tunnel

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("tunnel", fx.Provide(newModule))

Module

Functions

This section is empty.

Types

type Params

type Params struct {
	fx.In

	Logger *zap.Logger

	DB database.DBTX

	Auth auth.Authenticator
}

Params

type Result

type Result struct {
	fx.Out

	Transport gateway.Transport `group:"transport"`

	TunnelService Service `name:"tunnel_service"`
}

Result

type SecretKey

type SecretKey struct {
	Secret string
}

SecretKey

type Service

type Service interface {
	// Create
	Create(context.Context, TunnelCreate) (Tunnel, SecretKey, error)
	// Get
	Get(context.Context, string) (Tunnel, error)
	// List
	List(context.Context, int32, int32) ([]TunnelPartial, error)
	// Update
	Update(context.Context, TunnelUpdate) (Tunnel, error)
	// Delete
	Delete(context.Context, string) error

	// VerifyToken
	VerifyToken(context.Context, string) (string, error)

	// Health
	Health(context.Context) error
}

Service

type Tunnel

type Tunnel struct {
	ID        string
	Name      string
	CreatedAt time.Time
	UpdatedAt *time.Time
}

Tunnel

type TunnelCreate

type TunnelCreate struct {
	Name string
}

TunnelCreate

type TunnelPartial

type TunnelPartial struct {
	ID        string
	Name      string
	CreatedAt time.Time
}

TunnelPartial

type TunnelUpdate

type TunnelUpdate struct {
	OldName string
	Name    string
}

TunnelUpdate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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