apikey

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apikey

type Apikey interface {
	GetUserKeys(userid string, limit, offset int) ([]apikeymodel.Model, error)
	CheckKey(keyid, key string) (string, error)
	IntersectRoles(keyid string, authtags rank.Rank) (rank.Rank, error)
	Insert(userid string, authtags rank.Rank, name, desc string) (*ResApikeyModel, error)
	RotateKey(keyid string) (*ResApikeyModel, error)
	UpdateKey(keyid string, authtags rank.Rank, name, desc string) error
	DeleteKey(keyid string) error
	DeleteUserKeys(userid string) error
}

Apikey manages apikeys

type ResApikeyModel

type ResApikeyModel struct {
	Keyid string `json:"keyid"`
	Key   string `json:"key"`
}

type Service

type Service interface {
	governor.Service
	Apikey
}

func New

func New(apikeys apikeymodel.Repo, roles role.Role, kv kvstore.KVStore) Service

New returns a new Apikey

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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