Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Environment string `yaml:"environment"` WebsocketServer websocket.Config `yaml:"ws_server"` HTTPServer http.Config `yaml:"http_server"` Database database.Config `yaml:"database"` Parameters *Parameters }
Config reprsents the configs used by relay and other concepts on system.
func (*Config) GetNIP11Documents ¶
func (c *Config) GetNIP11Documents() *nip11.RelayInformationDocument
func (*Config) SetParameters ¶
func (c *Config) SetParameters(db *database.Database, params *Parameters) error
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents an error in loading or validating config.
type Fees ¶
type Fees struct { Subscription []Subscription `bson:"subscription,omitempty" json:"subscription,omitempty"` Publication []Publication `bson:"publication,omitempty" json:"publication,omitempty"` Admission []Admission `bson:"admission,omitempty" json:"admission,omitempty"` }
type Parameters ¶
type Parameters struct { Handler *handler.Config `bson:"handler" json:"handler"` WebsocketServer *websocket.Config `bson:"server" json:"server"` Retention *Retention `bson:"retention,omitempty" json:"retention,omitempty"` Fees *Fees `bson:"fees,omitempty" json:"fees,omitempty"` Name string `bson:"name" json:"name"` Description string `bson:"description" json:"description"` Pubkey string `bson:"pubkey" json:"pubkey"` Contact string `bson:"contact" json:"contact"` Software string `bson:"software" json:"software"` SupportedNips []int `bson:"supported_nips" json:"supported_nips"` Version string `bson:"version" json:"version"` RelayCountries []string `bson:"relay_countries,omitempty" json:"relay_countries,omitempty"` LanguageTags []string `bson:"language_tags,omitempty" json:"language_tags,omitempty"` Tags []string `bson:"tags,omitempty" json:"tags,omitempty"` PostingPolicy string `bson:"posting_policy,omitempty" json:"posting_policy,omitempty"` PaymentsURL string `bson:"payments_url,omitempty" json:"payments_url,omitempty"` Icon string `bson:"icon,omitempty" json:"icon,omitempty"` }
type Publication ¶
type Subscription ¶
Click to show internal directories.
Click to hide internal directories.