tools

package
v0.0.0-...-a70d403 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conf = GetConf()
View Source
var Port, _ = commandline()

Functions

func Bucket

func Bucket(client *oss.Client) *oss.Bucket

func Client

func Client() *oss.Client

func CompareHashAndPassword

func CompareHashAndPassword(password string, encoding string) bool

func GenerateFromPassword

func GenerateFromPassword(password string) string

func GetRandomPassword

func GetRandomPassword() string

func Upload

func Upload(fp io.Reader, objectName string) string

Types

type Admin

type Admin struct {
	Name     string
	Password string
	Website  string
	Email    string
	Admin    bool
}

type Config

type Config struct {
	PG    Postgres
	ADMIN Admin

	DOMAIN  Domain
	STORAGE Storage
}

func GetConf

func GetConf() Config

func (Config) String

func (c Config) String() string

type Domain

type Domain struct {
	MainDomain  string
	AdminDomain string
}

type Postgres

type Postgres struct {
	User     string
	Password string
	Host     string
	Port     int
	DataBase string
	SSLmode  string
}

func (Postgres) Connect

func (p Postgres) Connect() string

type Storage

type Storage struct {
	UseOss          bool
	EndPoint        string
	AccessKeyId     string
	AccessKeySecret string
	Bucket          string
	AliasDomain     string

	OssPrefix         string
	LocalSavePrefix   string
	LocalReturnPrefix string
}

Jump to

Keyboard shortcuts

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