auth

package
v0.0.0-...-f4bd7b1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinioAccessID = 20
	MinioSecretID = 40
)

AccessID and SecretID length in bytes

Variables

This section is empty.

Functions

func GenerateAccessKeyID

func GenerateAccessKeyID() ([]byte, *probe.Error)

GenerateAccessKeyID - generate random alpha numeric value using only uppercase characters takes input as size in integer

func GenerateSecretAccessKey

func GenerateSecretAccessKey() ([]byte, *probe.Error)

GenerateSecretAccessKey - generate random base64 numeric value from a random seed.

func IsValidAccessKey

func IsValidAccessKey(accessKeyID string) bool

IsValidAccessKey - validate access key

func IsValidSecretKey

func IsValidSecretKey(secretAccessKey string) bool

IsValidSecretKey - validate secret key

func SaveConfig

func SaveConfig(a *Config) *probe.Error

SaveConfig save donut config

func SetAuthConfigPath

func SetAuthConfigPath(configPath string)

SetAuthConfigPath - set custom auth config path

Types

type Config

type Config struct {
	Version string
	Users   map[string]*User
}

Config auth keys

func LoadConfig

func LoadConfig() (*Config, *probe.Error)

LoadConfig load donut config

type User

type User struct {
	Name            string
	AccessKeyID     string
	SecretAccessKey string
}

User container

Jump to

Keyboard shortcuts

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