Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AMQPConnection ¶
type AMQPConnection struct { User string Password string Host string Port int Broker string Exchange string Queue string }
AMQPConnection contains all of the db configuration values
func (*AMQPConnection) Marshal ¶
func (c *AMQPConnection) Marshal() string
Marshal returns an AMQP "Connection String"
type Data ¶
type Data struct { API struct { BaseURL string PathPrefix string Bind string SwaggerAPIPath string SwaggerPath string SwaggerFilePath string ImageFilePath string } Connections struct { Logger LoggerConnection PostgreSQL PostgreSQLConnection AMQP AMQPConnection Email EmailConfig PayPal string Stripe string } Processing struct { DonationCutBudget int64 } PaymentProviders struct { PayPal struct { ClientID string Secret string } Stripe struct { Key string Secret string } Hbci struct { Name string UserID string BankCode string Pin string URL string } Bitpay struct { Pem string URL string } } EmailTemplates Templates Web struct { BaseURL string ImageURL string } }
Data holds all API settings
var ( // Settings contains the parsed configuration values Settings *Data )
type EmailConfig ¶
type EmailConfig struct { AdminEmail string ReplyTo string SMTP struct { User string Password string Server string Port int } }
EmailConfig contains all email settings
type EmailTemplate ¶
EmailTemplate holds all values of one email template
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a clever config parser
func NewHandler ¶
func NewHandler(fileName string, unmarshalStruct interface{}, notificationChannel chan interface{}) *Handler
NewHandler returns a new config handler
func (*Handler) CurrentData ¶
func (ch *Handler) CurrentData() interface{}
CurrentData returns the current config data
func (*Handler) LastReadValid ¶
LastReadValid returns whether the last parse succeeded
func (*Handler) SetRescanInterval ¶
SetRescanInterval controls how often the config should be rescanned
type LoggerConnection ¶
LoggerConnection contains all of the logger settings
type PostgreSQLConnection ¶
type PostgreSQLConnection struct { User string Password string Host string Port int DbName string SslMode string }
PostgreSQLConnection contains all of the db configuration values
func (*PostgreSQLConnection) Marshal ¶
func (c *PostgreSQLConnection) Marshal() string
Marshal returns a "Connection String" with escaped values of all non-empty fields as described at http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
type Templates ¶
type Templates struct {
PaymentConfirmation EmailTemplate
}
Templates holds all email templates