about summary refs log tree commit diff stats
path: root/lib/Fornax/CLI.rakumod
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fornax/CLI.rakumod')
0 files changed, 0 insertions, 0 deletions
commit/types.go?h=v0.2.1&id=df1d1efa19aed5bc6553c7c0a0b4b7dfe20e3bd0'>df1d1ef ^
d62c82f ^
d6fbc25 ^


c831484 ^
cd635e6 ^












893123c ^
8af4945 ^
920306c ^

cd635e6 ^




f06a2d6 ^
747f4fb ^
df1d1ef ^







747f4fb ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

            



              
 
                      


                                           
 












                                                                 
 
 

                                                       




                                                  
 
 







                                                           



                                                          
package main

import (
	"sync"
	"time"
)

// content-type consts
const txtutf8 = "text/plain; charset=utf-8"
const htmlutf8 = "text/html; charset=utf-8"
const cssutf8 = "text/css; charset=utf-8"

// Configuration object definition
type Configuration struct {
	Mu            sync.RWMutex
	Port          int           `json:"ListenPort"`
	LogFile       string        `json:"LogFile"`
	DBPath        string        `json:"DatabasePath"`
	StdoutLogging bool          `json:"StdoutLogging"`
	Version       string        `json:"-"`
	CacheInterval time.Duration `json:"StatusFetchInterval"`
	DBInterval    time.Duration `json:"DatabasePushInterval"`
	LastCache     time.Time     `json:"-"`
	LastPush      time.Time     `json:"-"`
	Instance      `json:"Instance"`
}

// Instance refers to this specific instance of getwtxt
type Instance struct {
	Name  string `json:"Instance.SiteName"`
	URL   string `json:"Instance.URL"`
	Owner string `json:"Instance.OwnerName"`
	Mail  string `json:"Instance.Email"`
	Desc  string `json:"Instance.Description"`
}

// RemoteRegistries holds a list of remote registries to
// periodically scrape for new users. The remote registries
// must have been added via POST like a user.
type RemoteRegistries struct {
	Mu   sync.RWMutex
	List []string
}

// ipCtxKey is the Context value key for user IP addresses
type ipCtxKey int

const ctxKey ipCtxKey = iota