ops

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupDOmain

func CleanupDOmain(domain string) string

func CreateAdmin added in v1.6.0

func CreateAdmin(db *pebble.DB, name string, password string) error

Types

type Ops

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

func New

func New(db *pebble.DB, tr translation.Translator, sites ...string) *Ops

func (*Ops) APIKeys

func (db *Ops) APIKeys() (ls []*v1.APIKey, err error)

func (*Ops) Admin added in v1.6.0

func (db *Ops) Admin() (name string)

func (*Ops) CreateAPIKey

func (db *Ops) CreateAPIKey(name string, key string) error

func (*Ops) CreateSite

func (db *Ops) CreateSite(domain string, public bool)

func (*Ops) DeleteAPIKey

func (db *Ops) DeleteAPIKey(name string) error

func (*Ops) DeleteDomain

func (db *Ops) DeleteDomain(domain string)
func (db *Ops) DeleteSharedLink(site *v1.Site, slug string)

func (*Ops) Domains

func (db *Ops) Domains(f func(*v1.Site))
func (db *Ops) EditSharedLink(site *v1.Site, slug, name string)
func (db *Ops) FindOrCreateCreateSharedLink(domain string, name, password string) (share *v1.Share)

func (*Ops) HasSite added in v1.6.0

func (db *Ops) HasSite(domain string) (ok bool)

func (*Ops) Save

func (db *Ops) Save(u *v1.Site)

func (*Ops) SeenFirstStats

func (db *Ops) SeenFirstStats(domain string) (ok bool)

func (*Ops) Site

func (db *Ops) Site(domain string) (u *v1.Site)

func (*Ops) ValidAPIKkey

func (db *Ops) ValidAPIKkey(key string) bool

func (*Ops) ValidateSiteDomain

func (db *Ops) ValidateSiteDomain(domain string) (good, bad string)

func (*Ops) VerifyPassword added in v1.6.0

func (db *Ops) VerifyPassword(password string) (match bool)

func (*Ops) Web

func (db *Ops) Web() (secret *age.X25519Identity, err error)

Jump to

Keyboard shortcuts

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