config

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TierDemo = "demo"
	TierPaid = "paid"
)

Variables

View Source
var ValidTiers = []string{TierDemo, TierPaid}

Functions

func IsValidTier

func IsValidTier(tier string) bool

func Save

func Save(cfg *Config) error

Types

type Config

type Config struct {
	APIKey string `mapstructure:"api_key"`
	Tier   string `mapstructure:"tier"`
}

func Load

func Load() (*Config, error)

func (*Config) ApplyAuth

func (c *Config) ApplyAuth(req *http.Request)

func (*Config) AuthHeader

func (c *Config) AuthHeader() (string, string)

func (*Config) BaseURL

func (c *Config) BaseURL() string

func (*Config) IsPaid

func (c *Config) IsPaid() bool

func (*Config) MaskedKey

func (c *Config) MaskedKey() string

Jump to

Keyboard shortcuts

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