service

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	Verify(user, psd string) (pass bool)
}

func DefaultAuth

func DefaultAuth() Authorizer

type MemoryStore

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

func (*MemoryStore) Get

func (m *MemoryStore) Get(token string) bool

func (*MemoryStore) Remove

func (m *MemoryStore) Remove(token string)

func (*MemoryStore) Set

func (m *MemoryStore) Set() (token string)

type RedisStore

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

func (*RedisStore) Get

func (r *RedisStore) Get(token string) bool

func (*RedisStore) Remove

func (r *RedisStore) Remove(token string)

func (*RedisStore) Set

func (r *RedisStore) Set() (token string)

type TokenStore

type TokenStore interface {
	Set() (token string)
	Get(token string) bool
	Remove(token string)
}

func DefaultStore

func DefaultStore() TokenStore

Jump to

Keyboard shortcuts

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