types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	Entry     ServerEntry
	Services  func() ([]string, error)
	Users     func(string) ([]string, error)
	ReadUser  func(string, string) (UserEntry, error)
	WriteUser func(UserEntry, string) error
}

type DatabaseType

type DatabaseType string
const (
	GithubDB   DatabaseType = "github"
	MySQLDB    DatabaseType = "mysql"
	SQLiteDB   DatabaseType = "sqlite"
	PostgresDB DatabaseType = "postgres"
	LocalDB    DatabaseType = "local"
	GoogleDB   DatabaseType = "google"
)

type ServerEntry

type ServerEntry struct {
	ServerName string       `json:"name"`
	URL        string       `json:"url"`
	Type       DatabaseType `json:"type"`
	User       string       `json:"user"`
	Token      string       `json:"token"`
}

type UserEntry

type UserEntry struct {
	Username string `json:"username"`
	ID       string `json:"id"`
	Profile  string `json:"profile"`
	Reason   string `json:"reason"`
}

Jump to

Keyboard shortcuts

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