mytokenrepo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MytokenEntry

type MytokenEntry struct {
	ID       mtid.MTID
	SeqNo    uint64
	ParentID mtid.MTID `db:"parent_id"`
	RootID   mtid.MTID `db:"root_id"`
	Token    *mytoken.Mytoken

	Name string
	IP   string `db:"ip_created"`
	// contains filtered or unexported fields
}

MytokenEntry holds the information of a MytokenEntry as stored in the database

func NewMytokenEntry

func NewMytokenEntry(mt *mytoken.Mytoken, name string, networkData api.ClientMetaData) *MytokenEntry

NewMytokenEntry creates a new MytokenEntry

func (*MytokenEntry) InitRefreshToken

func (ste *MytokenEntry) InitRefreshToken(rt string) error

func (*MytokenEntry) Root

func (ste *MytokenEntry) Root() bool

Root checks if this MytokenEntry is a root token

func (*MytokenEntry) SetRefreshToken

func (ste *MytokenEntry) SetRefreshToken(rtID uint64, key []byte) error

func (*MytokenEntry) Store

func (ste *MytokenEntry) Store(tx *sqlx.Tx, comment string) error

Store stores the MytokenEntry in the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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