util

package
v0.0.0-...-b95dbb3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHashedPw

func CheckHashedPw(pw string, salt Salt, hash Hash) bool

func EnsureFileRemoved

func EnsureFileRemoved(name string) error

EnsureFileRemoved checks the given path and tries to Close and Remove it if it exists.

func HashedAndSalt

func HashedAndSalt(pw, saltSeed string) (Hash, Salt)

Types

type Hash

type Hash string

type Key

type Key string

func SaltedHash

func SaltedHash(pw, saltSeed string) Key

type Permissions

type Permissions struct {
	Owner string
}

Permissions represents the permissions of an object.

func (*Permissions) ReadAuthorized

func (p *Permissions) ReadAuthorized(email string) error

ReadAuthorized determines if a given user is read authorized.

func (*Permissions) WriteAuthorized

func (p *Permissions) WriteAuthorized(email string) error

WriteAuthorized determines if a given user is write authorized.

type Salt

type Salt string

Jump to

Keyboard shortcuts

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