Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultConfig() string
- func DefaultConfigDir() string
- func EmptyPort(host string) (port string, err error)
- func FindConfig(s string) string
- func SortHosts(hosts []string)
- type Addr
- type App
- type Config
- func (conf *Config) Address() string
- func (conf *Config) AppByHost(host string) (*App, error)
- func (conf *Config) AppByName(name string) (app *App, err error)
- func (conf *Config) AppByPath(path string) (app *App, err error)
- func (conf *Config) Apps() map[string]*App
- func (conf *Config) Domains() []string
- func (conf *Config) Edit() error
- func (conf *Config) FindApp(name string) (*App, error)
- func (conf *Config) GetCertificate(app *App) (*tls.Certificate, error)
- func (conf *Config) HasCertificate(app *App) bool
- func (conf *Config) Hosts() []string
- func (conf *Config) LaunchByApp(app *App) *Launch
- func (conf *Config) LaunchByPath(dir string) *Launch
- func (conf *Config) LoadConfig(fname string) error
- func (conf *Config) LogByApp(app *App, t *time.Time) string
- func (conf *Config) Logger() logr.Logger
- func (conf *Config) LogsByApp(app *App) ([]string, error)
- func (conf *Config) MakeURL(app *App) string
- func (conf *Config) Mkdirs() error
- func (conf *Config) NewShell(rc ...string) *dotrc.Dotrc
- func (conf *Config) ServerLog() string
- type DNSSD
- type DuplicationError
- type Hosts
- type Launch
- type NameServer
- type PathError
- type Server
Constants ¶
View Source
const ( HTTPRISM_DIR = "HTTPRISM_DIR" HTTPRISM_CONFIG = "HTTPRISM_CONFIG" )
View Source
const CurrLog = "curr.log"
Variables ¶
View Source
var (
ErrNotExist = errors.New("app does not exist")
)
Functions ¶
func DefaultConfig ¶
func DefaultConfig() string
func DefaultConfigDir ¶
func DefaultConfigDir() string
func FindConfig ¶
Types ¶
type Config ¶
type Config struct {
Sites string
Log string
Rc string
Listen string
Logging string
MaxLogs int
Domain []string `toml:"domains,omitempty"`
Dotrc []string `toml:",omitempty"`
Env []string `toml:",omitempty"`
Editor []string `toml:",omitempty"`
TLS struct {
Crt []string
Key []string
}
DNS Addr
HTTP Addr
API Addr
Launch map[string]*Launch
// contains filtered or unexported fields
}
func (*Config) GetCertificate ¶
func (conf *Config) GetCertificate(app *App) (*tls.Certificate, error)
func (*Config) HasCertificate ¶
func (*Config) LaunchByApp ¶
func (*Config) LaunchByPath ¶
func (*Config) LoadConfig ¶
type DNSSD ¶
type DuplicationError ¶
type DuplicationError struct {
Data []string
}
func (*DuplicationError) Error ¶
func (e *DuplicationError) Error() string
type Launch ¶
type NameServer ¶
type NameServer struct {
Config *Config
}
func (*NameServer) HandleRequest ¶
func (s *NameServer) HandleRequest(w dns.ResponseWriter, req *dns.Msg)
func (*NameServer) Run ¶
func (s *NameServer) Run(addr string) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.