session

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSession

func AddSession(sess Session) error

AddSession appends an additional session to auth.json

func UseSession

func UseSession(email string) error

Types

type Config

type Config []Session

Config stores all logged in sessions

type Session

type Session struct {
	Token   string `json:"token"`
	Email   string `json:"email"`
	Default bool   `json:"default"`
	Alias   string `json:"alias"`
}

Session stores user credentials

func CurrentSession

func CurrentSession() (Session, error)

func RemoveSession

func RemoveSession() (Session, error)

func Sessions

func Sessions() ([]Session, error)

Jump to

Keyboard shortcuts

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