token

package
v0.0.0-...-53a2e65 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	User *User

	TokenString string
	// contains filtered or unexported fields
}

func New

func New(conf *configuration.Configuration) *Token

func (*Token) Create

func (t *Token) Create(user *User) error

func (*Token) IsValid

func (t *Token) IsValid(header string) bool

type User

type User struct {
	ID       primitive.ObjectID
	Name     string
	Surename string
	Admin    bool
}

Jump to

Keyboard shortcuts

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