status

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SessionInfos = map[string]StatusInfo{}
{
	"terminus-org.app.terminus.io": {
		"sessionid": "",
		"orgID": 1,
		"id": "0001",
		"nickName": "username",
	},
	"terminus-org.test.terminus.io": {
		"sessionid": "",
		"orgID": 2,
		"id": "0002",
		"nickName": "username",
	}
}

Functions

func GetSessionInfos

func GetSessionInfos() (map[string]StatusInfo, error)

GetSessionInfos fetch sessions

func StoreSessionInfo

func StoreSessionInfo(host string, stat StatusInfo) error

StoreSessionInfo write session info to file ~/.dice.d/sessions

Types

type StatusInfo

type StatusInfo struct {
	SessionID string     `json:"sessionid"`
	ExpiredAt *time.Time `json:"expiredAt"`
	OrgID     uint64     `json:"orgID"`
	UserInfo
}

type UserInfo

type UserInfo struct {
	ID          string `json:"id"`
	Email       string `json:"email"`
	NickName    string `json:"nickName"`
	Enabled     bool   `json:"enabled"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
	LastLoginAt string `json:"lastLoginAt"`
}

Jump to

Keyboard shortcuts

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