Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Create(ctx context.Context, clientID string, t *StoredTunnel) (*StoredTunnel, error)
- func (m *Manager) Delete(ctx context.Context, clientID, id string) error
- func (m *Manager) List(ctx context.Context, options *query.ListOptions, clientID string) (*api.SuccessPayload, error)
- func (m *Manager) Update(ctx context.Context, clientID string, t *StoredTunnel) (*StoredTunnel, error)
- type Provider
- type SQLiteProvider
- func (p *SQLiteProvider) Count(ctx context.Context, clientID string, options *query.ListOptions) (int, error)
- func (p *SQLiteProvider) Delete(ctx context.Context, clientID, id string) error
- func (p *SQLiteProvider) Insert(ctx context.Context, t *StoredTunnel) error
- func (p *SQLiteProvider) List(ctx context.Context, clientID string, options *query.ListOptions) ([]*StoredTunnel, error)
- func (p *SQLiteProvider) Update(ctx context.Context, t *StoredTunnel) error
- type StoredTunnel
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 (*Manager) Create ¶
func (m *Manager) Create(ctx context.Context, clientID string, t *StoredTunnel) (*StoredTunnel, 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 Provider ¶
type Provider interface { Delete(context.Context, string, string) error Insert(context.Context, *StoredTunnel) error Update(context.Context, *StoredTunnel) error List(context.Context, string, *query.ListOptions) ([]*StoredTunnel, error) Count(context.Context, string, *query.ListOptions) (int, 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"` }
Click to show internal directories.
Click to hide internal directories.