config

package
v0.0.0-...-bdf525e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "slink"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment   string `envconfig:"ENVIRONMENT" required:"true" json:"environment"`
	ProjectID     string `envconfig:"PROJECT_ID" required:"true" json:"project_id"`
	Port          int    `envconfig:"PORT" required:"true" json:"port"`
	Secret        string `envconfig:"SECRET" required:"true" json:"-"`
	AlgoliaAppID  string `envconfig:"ALGOLIA_APP_ID" required:"true" json:"-"`
	AlgoliaAPIKey string `envconfig:"ALGOLIA_API_KEY" required:"true" json:"-"`
	AsyncTopic    string `envconfig:"ASYNC_TOPIC" json:"async_topic"`
}

func New

func New() (*Config, error)

func (*Config) Collection

func (c *Config) Collection(name string) string

func (*Config) IsDevelopment

func (c *Config) IsDevelopment() bool

func (*Config) IsHosted

func (c *Config) IsHosted() bool

func (*Config) IsLocal

func (c *Config) IsLocal() bool

func (*Config) IsProduction

func (c *Config) IsProduction() bool

func (*Config) IsStaging

func (c *Config) IsStaging() bool

func (*Config) NewLogger

func (c *Config) NewLogger() (*zap.Logger, error)

Jump to

Keyboard shortcuts

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