config

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatabaseDSN

func GetDatabaseDSN() string

func Init

func Init(configPath string)

func InitCliConfig

func InitCliConfig()

Types

type ArweaveConfig

type ArweaveConfig struct {
	Jwk       string `json:"jwk"`
	ClientUrl string `json:"client_url"`
}

type CliConfig

type CliConfig struct {
	ServerURL  string `json:"server_url"`
	UploadPath string `json:"upload_url"`
	QueryPath  string `json:"query_url"`
}

type Config

type Config struct {
	DB       DBConfig       `json:"db"`
	Platform PlatformConfig `json:"platform"`
	Arweave  ArweaveConfig  `json:"arweave"`
	Sqs      SqsConfig      `json:"sqs"`
}
var (
	C     *Config = new(Config)
	Viper *viper.Viper
)

type DBConfig

type DBConfig struct {
	Host     string `json:"host"`
	Port     uint   `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	DBName   string `json:"db_name"`
	TZ       string `json:"tz"`
}

type DiscordPlatformConfig

type DiscordPlatformConfig struct {
	BotToken             string `json:"bot_token"`
	ProofServerChannelID string `json:"proof_server_channel_id"`
}

type EthereumPlatformConfig

type EthereumPlatformConfig struct {
	RPCServer string `json:"rpc_server"`
}

type PlatformConfig

type PlatformConfig struct {
	Twitter  TwitterPlatformConfig  `json:"twitter"`
	Ethereum EthereumPlatformConfig `json:"ethereum"`
	Discord  DiscordPlatformConfig  `json:"discord"`
}

type SqsConfig

type SqsConfig struct {
	QueueName string `json:"queue_name"`
}

type TwitterPlatformConfig

type TwitterPlatformConfig struct {
	AccessToken       string `json:"access_token"`
	AccessTokenSecret string `json:"access_token_secret"`
	ConsumerKey       string `json:"consumer_key"`
	ConsumerSecret    string `json:"consumer_secret"`
}

Jump to

Keyboard shortcuts

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