auth

package
v0.0.0-...-3a238e9 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(t *Ticket) (err error)

Add adds Auth for ticket

func MayRead

func MayRead(u string, size int64) (*url.URL, error)

MayRead checks if caller may read up to size bytes, and return a url that the caller may read from, or an error describing why the operation is forbidden.

func MayWrite

func MayWrite(u string, size int64) (*url.URL, error)

MayWrite checks if caller may write up to size bytes, and return a url that the caller may write to, or an error describing why the operation is forbidden.

func Remove

func Remove(u string)

Remove removes Auth for u

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

Auth provide authorization based on ticket and creation time

type Bytes

type Bytes int64

type Seconds

type Seconds uint

type Ticket

type Ticket struct {
	Mode    string
	Size    Bytes
	Url     string
	Uuid    string
	Timeout Seconds
}

func ParseTicket

func ParseTicket(buf []byte) (t *Ticket, err error)

Jump to

Keyboard shortcuts

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