status

package
Version: v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.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"`
}

Source Files

Jump to

Keyboard shortcuts

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