site

package
v0.0.0-...-e197d81 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Site

type Site struct {
	Domain          string
	CanonicalURL    string
	UptimeURL       string
	LockedStatus    bool
	OpenDirectories []string
}

Site is a representation of a single website managed by a server

func GetSite

func GetSite(url string) (Site, error)

GetSite - make sure this domain is a valid one, and if so, return a new site instance after reading it's state from the JSON config file

func LoadSiteByDomain

func LoadSiteByDomain(domain string) (Site, error)

LoadSiteByDomain - pass in a domain as a string and it should be found on this server. This will check that the folder exists in the standard hosting directory, that the unix user's home folder exists in the CONFIG_FILE_ROOT, and anything else that needs to happen to make sure the site is able to be maintaned by this application.

func (*Site) LoadStatus

func (s *Site) LoadStatus() error

LoadStatus - hydrate a site by the contents of of a JSON config file

Jump to

Keyboard shortcuts

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