Documentation ¶
Index ¶
- Variables
- func CopyURL(u *url.URL) *url.URL
- func FositeStore() *storage.MemoryStore
- func GenerateSecret(length int) ([]byte, error)
- func JoinURL(u *url.URL, args ...string) (ep *url.URL)
- func JoinURLStrings(host string, parts ...string) string
- func LadonWarden(ps map[string]ladon.Policy) ladon.Warden
- func LogError(err error, logger log.FieldLogger)
- func Must(err error, message string, args ...interface{})
- func MustArgs(expected, actual int)
- func MustRSAKey() *rsa.PrivateKey
- func Retry(logger logrus.FieldLogger, maxWait time.Duration, failAfter time.Duration, ...) (err error)
- func SplitNonEmpty(s, sep string) []string
- func Tokens(length int) (res [][]string)
- type FositeStorer
- type RichError
- type SuperAgent
- func (s *SuperAgent) Create(o interface{}) error
- func (s *SuperAgent) Delete() error
- func (s *SuperAgent) DoDry(req *http.Request) error
- func (s *SuperAgent) Get(o interface{}) error
- func (s *SuperAgent) POST(in, out interface{}) error
- func (s *SuperAgent) Patch(o interface{}) error
- func (s *SuperAgent) Update(o interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = &RichError{ Status: http.StatusNotFound, error: errors.New("Not found"), } )
View Source
var HMACStrategy = &oauth2.HMACSHAStrategy{ Enigma: &hmac.HMACStrategy{ GlobalSecret: []byte("1234567890123456789012345678901234567890"), }, AccessTokenLifespan: time.Hour, AuthorizeCodeLifespan: time.Hour, }
Functions ¶
func FositeStore ¶
func FositeStore() *storage.MemoryStore
func GenerateSecret ¶
func JoinURLStrings ¶
func LogError ¶
func LogError(err error, logger log.FieldLogger)
func MustRSAKey ¶
func MustRSAKey() *rsa.PrivateKey
func SplitNonEmpty ¶ added in v0.8.7
SplitNonEmpty is a special case of strings.Split which returns an empty slice if string is empty
Types ¶
type FositeStorer ¶
type RichError ¶ added in v0.8.6
type RichError struct { Status int // contains filtered or unexported fields }
func (*RichError) StatusCode ¶ added in v0.8.6
type SuperAgent ¶
func NewSuperAgent ¶
func NewSuperAgent(rawurl string) *SuperAgent
func (*SuperAgent) Create ¶
func (s *SuperAgent) Create(o interface{}) error
func (*SuperAgent) Delete ¶
func (s *SuperAgent) Delete() error
func (*SuperAgent) Get ¶
func (s *SuperAgent) Get(o interface{}) error
func (*SuperAgent) POST ¶
func (s *SuperAgent) POST(in, out interface{}) error
func (*SuperAgent) Patch ¶ added in v0.9.14
func (s *SuperAgent) Patch(o interface{}) error
func (*SuperAgent) Update ¶
func (s *SuperAgent) Update(o interface{}) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.