storedtunnels

package
v0.0.0-...-391d5ce Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func New

func New(db *sqlx.DB) *Manager

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, clientID string, t *StoredTunnel) (*StoredTunnel, error)

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, clientID, id string) error

func (*Manager) List

func (m *Manager) List(ctx context.Context, options *query.ListOptions, clientID string) (*api.SuccessPayload, error)

func (*Manager) Update

func (m *Manager) Update(ctx context.Context, clientID string, t *StoredTunnel) (*StoredTunnel, error)

type SQLiteProvider

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

func (*SQLiteProvider) Count

func (p *SQLiteProvider) Count(ctx context.Context, clientID string, options *query.ListOptions) (int, error)

func (*SQLiteProvider) Delete

func (p *SQLiteProvider) Delete(ctx context.Context, clientID, id string) error

func (*SQLiteProvider) Insert

func (p *SQLiteProvider) Insert(ctx context.Context, t *StoredTunnel) error

func (*SQLiteProvider) List

func (p *SQLiteProvider) List(ctx context.Context, clientID string, options *query.ListOptions) ([]*StoredTunnel, error)

func (*SQLiteProvider) Update

func (p *SQLiteProvider) Update(ctx context.Context, t *StoredTunnel) error

type StoredTunnel

type StoredTunnel struct {
	ID             string            `json:"id" db:"id"`
	ClientID       string            `json:"-" db:"client_id"`
	CreatedAt      time.Time         `json:"created_at" db:"created_at"`
	Name           string            `json:"name" db:"name"`
	Scheme         *string           `json:"scheme" db:"scheme"`
	RemoteIP       *string           `json:"remote_ip" db:"remote_ip"`
	RemotePort     *int              `json:"remote_port" db:"remote_port"`
	PublicPort     *int              `json:"public_port" db:"public_port"`
	ACL            *string           `json:"acl" db:"acl"`
	FurtherOptions *types.JSONString `json:"further_options" db:"further_options"`
}

Jump to

Keyboard shortcuts

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