tools

package
v0.0.0-...-f52b5d7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conf = GetConf()

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 {
	System System
	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
}

type System

type System struct {
	Port int
}

Jump to

Keyboard shortcuts

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