tools

package
v0.0.0-...-0959ca7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 ReadCommand

func ReadCommand() string

func Upload

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

Types

type Account

type Account struct {
	Name  string `json:"name"`
	Alias string `json:"alias"`
	Token string `json:"token"`
}

type Config

type Config struct {
	Mysql   Mysql
	Account Account
	Storage Storage
	Server  Server
}

func GetConfiguration

func GetConfiguration() Config

type Mysql

type Mysql struct {
	ConnectString string
}

type Server

type Server struct {
	Port int
}

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