appcontext

package
v0.0.0-...-833fa1d Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package appcontext provides config options

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigType

type ConfigType struct {
	ServiceName    string `json:"service_name" yaml:"service_name" env:"SERVICE_NAME" default:"websource.api"`
	DatacenterName string `json:"datacenter_name" yaml:"datacenter_name" env:"DC_NAME" default:"??"`
	Hostname       string `json:"hostname" yaml:"hostname" env:"HOSTNAME"`
	Hostcode       string `json:"hostcode" yaml:"hostcode" env:"HOSTCODE"`

	LogAddr    string `json:"log_addr" default:"" env:"LOG_ADDR"`
	LogLevel   string `json:"log_level" default:"debug" env:"LOG_LEVEL"`
	LogEncoder string `json:"log_encoder" env:"LOG_ENCODER"`

	Server      serverConfig     `json:"server" yaml:"server"`
	Session     sessionConfig    `json:"session" yaml:"session"`
	System      systemConfig     `json:"system" yaml:"system"`
	SocialAuth  socialAuthConfig `json:"social_auth" yaml:"social_auth"`
	OAuth2      oauth2Config     `json:"oauth2" yaml:"oauth2"`
	Permissions permissionConfig `json:"permissions" yaml:"permissions"`
}

ConfigType contains all application options

var Config ConfigType

Config global value

func (*ConfigType) IsDebug

func (cfg *ConfigType) IsDebug() bool

IsDebug mode

func (*ConfigType) String

func (cfg *ConfigType) String() (res string)

String implementation of Stringer interface

Jump to

Keyboard shortcuts

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