config

package
v0.0.0-...-916f8e4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server     Server     `yaml:"server"`
	Params     Params     `yaml:"params"`
	Twitter    TwitterKey `yaml:"twitter_key"`
	UseArchive bool       `yaml:"archive" env:"USE_ARCHIVE"`
	Databases  Database   `yaml:"database"`
}

type Database

type Database struct {
	Firebase Firebase `yaml:"firebase"`
}

type DelayDuration

type DelayDuration struct {
	Interval  int `yaml:"interval" env:"DELAY_DURATION_INTERVAL"`
	Sleep     int `yaml:"sleep" env:"DELAY_DURATION_SLEEP"`
	RateLimit int `yaml:"rate_limit" env:"DELAY_DURATION_RATELIMIT"`
}

type Firebase

type Firebase struct {
	FirebaseAdmin FirebaseAdminSDKCred `yaml:"firebase_admin"`
	DatabaseURL   string               `yaml:"database_url" env:"FIREBASE_RTDB_URL"`
}

type FirebaseAdminSDKCred

type FirebaseAdminSDKCred struct {
	Type          string `yaml:"type" json:"type" env:"FIREBASE_ADMIN_TYPE"`
	ProjectID     string `yaml:"project_id" json:"project_id" env:"FIREBASE_ADMIN_PROJECT_ID"`
	PrivateKeyID  string `yaml:"private_key_id" json:"private_key_id" env:"FIREBASE_ADMIN_PRIVATE_KEY_ID"`
	PrivateKey    string `yaml:"private_key" json:"private_key" env:"FIREBASE_ADMIN_PRIVATE_KEY"`
	ClientEmail   string `yaml:"client_email" json:"client_email" env:"FIREBASE_ADMIN_CLIENT_EMAIL"`
	ClientID      string `yaml:"client_id" json:"client_id" env:"FIREBASE_ADMIN_CLIENT_ID"`
	AuthURI       string `yaml:"auth_uri" json:"auth_uri" env:"FIREBASE_ADMIN_AUTH_URI"`
	TokenURL      string `yaml:"token_uri" json:"token_uri" env:"FIREBASE_ADMIN_TOKEN_URL"`
	AuthProvider  string `yaml:"auth_provider_x509_cert_url" json:"auth_provider_x509_cert_url" env:"FIREBASE_ADMIN_AUTH_PROVIDER"`
	ClientCertURL string `yaml:"client_x509_cert_url" json:"client_x509_cert_url" env:"FIREBASE_ADMIN_CLIENT_CERT_URL"`
}

type MessageResponse

type MessageResponse struct {
	Success   string `yaml:"success" env:"MESSAGE_RESPONSE_SUCCESS"`
	Failed    string `yaml:"failed" env:"MESSAGE_RESPONSE_FAILED"`
	Incorrect string `yaml:"incorrect" env:"MESSAGE_RESPONSE_INCORRECT"`
}

type Params

type Params struct {
	Keyword         string          `yaml:"keyword" env:"DM_KEYWORD"`
	MessageCount    int             `yaml:"message_count" env:"MESSAGE_COUNT"`
	MessageResponse MessageResponse `yaml:"message_response"`
	DelayDuration   DelayDuration   `yaml:"delay_duration"`
}

type Server

type Server struct {
	Port                string `yaml:"port" env:"PORT"`
	Debug               bool   `yaml:"debug" env:"DEBUG"`
	ReadTimeoutSeconds  int    `yaml:"read_timeout_seconds" env:"SERVER_READ_TIMEOUT"`
	WriteTimeoutSeconds int    `yaml:"write_timeout_seconds" env:"SERVER_READ_TIMEOUT"`
}

type TwitterKey

type TwitterKey struct {
	ConsumerKey       string `yaml:"consumer_key" env:"TWITTER_CONSUMER_KEY"`
	ConsumerSecret    string `yaml:"consumer_secret" env:"TWITTER_CONSUMER_SECRET"`
	AccessToken       string `yaml:"access_token" env:"TWITTER_ACCESS_TOKEN"`
	AccessTokenSecret string `yaml:"access_token_secret" env:"TWITTER_ACCESS_TOKEN_SECRET"`
}

Jump to

Keyboard shortcuts

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