RethinkDBStorage

package module
v0.0.0-...-cf0a350 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: MIT Imports: 3 Imported by: 0

README

osin-rethinkdb

GoDoc Build Status Go Report Card Coverage Status

This package implements the storage for OSIN with RethinkDB using gorethink.

baby-gopher

License

This package is made available under the MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RethinkDBStorage

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

RethinkDBStorage implements storage for osin

func New

func New(session *r.Session) *RethinkDBStorage

New initializes and returns a new RethinkDBStorage

func (*RethinkDBStorage) Clone

func (s *RethinkDBStorage) Clone() osin.Storage

Clone the storage if needed.

func (*RethinkDBStorage) Close

func (s *RethinkDBStorage) Close()

Close the resources the Storage potentially holds

func (*RethinkDBStorage) CreateClient

func (s *RethinkDBStorage) CreateClient(c osin.Client) error

CreateClient inserts a new client

func (*RethinkDBStorage) DeleteClient

func (s *RethinkDBStorage) DeleteClient(c osin.Client) error

DeleteClient deletes given client

func (*RethinkDBStorage) GetClient

func (s *RethinkDBStorage) GetClient(clientID string) (osin.Client, error)

GetClient returns client with given ID

func (*RethinkDBStorage) LoadAccess

func (s *RethinkDBStorage) LoadAccess(accessToken string) (*osin.AccessData, error)

LoadAccess gets access data with given access token

func (*RethinkDBStorage) LoadAuthorize

func (s *RethinkDBStorage) LoadAuthorize(code string) (*osin.AuthorizeData, error)

LoadAuthorize gets authorization data with given code

func (*RethinkDBStorage) LoadRefresh

func (s *RethinkDBStorage) LoadRefresh(refreshToken string) (*osin.AccessData, error)

LoadRefresh gets access data with given refresh token

func (*RethinkDBStorage) RemoveAccess

func (s *RethinkDBStorage) RemoveAccess(accessToken string) error

RemoveAccess deletes AccessData with given access token

func (*RethinkDBStorage) RemoveAuthorize

func (s *RethinkDBStorage) RemoveAuthorize(code string) error

RemoveAuthorize deletes given authorization

func (*RethinkDBStorage) RemoveRefresh

func (s *RethinkDBStorage) RemoveRefresh(refreshToken string) error

RemoveRefresh deletes AccessData with given refresh token

func (*RethinkDBStorage) SaveAccess

func (s *RethinkDBStorage) SaveAccess(data *osin.AccessData) error

SaveAccess creates a new access data

func (*RethinkDBStorage) SaveAuthorize

func (s *RethinkDBStorage) SaveAuthorize(data *osin.AuthorizeData) error

SaveAuthorize creates a new authorization

func (*RethinkDBStorage) UpdateClient

func (s *RethinkDBStorage) UpdateClient(c osin.Client) error

UpdateClient updates given client

Jump to

Keyboard shortcuts

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