config

package
v0.0.0-...-50a15a0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Setting Setting `mapstructure:"setting"`
	Cookie  Cookie  `mapstructure:"cookie"`

	// OAuthRaw oauth setting
	OAuthRaw *Section `mapstructure:"-"`
}

func NewConfig

func NewConfig() *Config
type Cookie struct {
	// SecretKey Cookieシークレットキー
	SecretKey string `mapstructure:"secret_key"`
	// Secure セキュアクッキー
	Secure bool `mapstructure:"secure"`
	// SameSiteDisabled
	SameSiteDisabled bool          `mapstructure:"same_site_disabled"`
	SameSiteMode     http.SameSite `mapstructure:"same_site_mode"`
	KeyPairs         []string      `mapstructure:"key_pairs"`
}

type Key

type Key struct {
	// contains filtered or unexported fields
}

func (Key) Bool

func (k Key) Bool() bool

func (Key) Int

func (k Key) Int() int

func (Key) MustBool

func (k Key) MustBool(defaultVal ...bool) bool

func (Key) MustString

func (k Key) MustString(defaultValue string) string

func (Key) String

func (k Key) String() string

func (Key) StringExpand

func (k Key) StringExpand() string

func (Key) StringMap

func (k Key) StringMap() map[string]interface{}

func (Key) StringSlice

func (k Key) StringSlice() []string

func (Key) Strings

func (k Key) Strings(delim string) []string

type Section

type Section struct {
	// contains filtered or unexported fields
}

func NewSection

func NewSection(key string) *Section

func (*Section) Get

func (s *Section) Get() map[string]interface{}

func (*Section) Key

func (s *Section) Key(key string) Key

func (*Section) Section

func (s *Section) Section(key string) *Section

type Setting

type Setting struct {
	// RootURL アプリケーションの完全URL
	RootURL string `mapstructure:"root_url"`
	// contains filtered or unexported fields
}

func (Setting) GetRootURL

func (setting Setting) GetRootURL() *url.URL

Jump to

Keyboard shortcuts

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