config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright (c) 2021 Kross IAM Project. https://github.com/krossdev/iam/blob/main/LICENSE

Index

Constants

View Source
const (
	IPLocationEngineGeoip = "geoip"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionIPLocation

type ActionIPLocation struct {
	Subscribe bool   `yaml:"subscribe"`
	Engine    string `yaml:"engine"`
}

type ActionSendVerifyEmail

type ActionSendVerifyEmail struct {
	Subscribe bool `yaml:"subscribe"`
}

type Configuration

type Configuration struct {
	Debug   bool     `yaml:"debug"`
	Log     Log      `yaml:"log"`
	Brokers []string `yaml:"brokers"`
	Service Service  `yaml:"service"`
	Mail    Mail     `yaml:"mail"`
	Geoip   Geoip    `yaml:"geoip"`
}

func Load

func Load(path string) (*Configuration, error)

Load configuration from file

type Geoip

type Geoip struct {
	Path string `yaml:"path"`
}

type Log

type Log struct {
	Path     string `yaml:"path"`
	Airbrake struct {
		Pid int64  `yaml:"pid"`
		Key string `yaml:"key"`
	}
}

type Mail

type Mail struct {
	SubjectPrefix string `yaml:"subject_prefix"`
	TemplateDir   string `yaml:"template_dir"`
	Mtas          []Mta  `yaml:"mtas"`
	PreferredMta  string `yaml:"preferred_mta"`
}

Mail

type Mta

type Mta struct {
	Name    string   `yaml:"name"`
	Host    string   `yaml:"host"`
	Port    int      `yaml:"port"`
	SSLMode bool     `yaml:"sslmode"`
	Sender  string   `yaml:"sender"`
	ReplyTo string   `yaml:"replyto"`
	CC      []string `yaml:"cc"`
	BCC     []string `yaml:"bcc"`
	User    string   `yaml:"user"`
	Passwd  string   `yaml:"passwd"`
}

type Service

type Service struct {
	Audits  ServiceAudits  `yaml:"audits"`
	Events  ServiceEvents  `yaml:"events"`
	Actions ServiceActions `yaml:"actions"`
}

Service

type ServiceActions

type ServiceActions struct {
	IPLocation      ActionIPLocation      `yaml:"ip_location"`
	SendVerifyEmail ActionSendVerifyEmail `yaml:"send_verify_email"`
}

type ServiceAudits

type ServiceAudits struct {
	Subscribe bool `yaml:"subscribe"`
}

type ServiceEvents

type ServiceEvents struct {
	Subscribe bool `yaml:"subscribe"`
}

Jump to

Keyboard shortcuts

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