sqlite

package
v0.0.0-...-9633304 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config string) (driver.Storager, error)

Types

type Config

type Config struct {
	DB *gorm.DB
}

func (*Config) ActivateSession

func (c *Config) ActivateSession(id uint, activate bool)

func (*Config) AddServer

func (c *Config) AddServer(name, tsaURL, description string)

func (*Config) AddSession

func (c *Config) AddSession(serverID uint, token string)

func (*Config) End

func (c *Config) End()

func (*Config) ListServers

func (c *Config) ListServers(filter map[string]string) []driver.ServerResult

func (*Config) ListSessions

func (c *Config) ListSessions(filter map[string]string) []driver.SessionResult

func (*Config) RemoveAllSessions

func (c *Config) RemoveAllSessions()

func (*Config) RemoveServer

func (c *Config) RemoveServer(name string)

func (*Config) RemoveSession

func (c *Config) RemoveSession(id uint)

type Model

type Model struct {
	ID        uint      `gorm:"primary_key"`
	CreatedAt time.Time `gorm:"created_at"`
}

type Server

type Server struct {
	Model

	Name        string `gorm:"unique;"`
	TSAURL      string
	Description string
}

type Session

type Session struct {
	Model

	Server   Server `gorm:"unique;"`
	ServerID uint
	Active   bool
	Token    string
}

Jump to

Keyboard shortcuts

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