Documentation ¶
Index ¶
- Constants
- func SortNodesByKey(nodes []Node)
- func SortSystemUserByPriority(sysUsers []SystemUser)
- type Asset
- type AssetList
- type AssetLoginTicketInfo
- type AssetNodeSorter
- type AssetUserInfo
- type ExpireInfo
- type LoginTicket
- type Node
- type NodeList
- type PaginationParam
- type PaginationResponse
- type Session
- type SystemUser
- type TerminalConfig
- type TicketState
- type User
- type UserClient
- type UserClientOption
- type UserLog
- type UserSecret
Constants ¶
View Source
const ( TicketOpen = "pending" TicketApproved = "approved" TicketRejected = "rejected" TicketClosed = "closed" )
View Source
const ( AssetType = iota NodeType UserType SystemUserType AssetUserInfoType UserlogType LoginTicketType UserSecretType )
View Source
const (
ProtocolSSH = "ssh"
)
Variables ¶
This section is empty.
Functions ¶
func SortNodesByKey ¶
func SortNodesByKey(nodes []Node)
func SortSystemUserByPriority ¶
func SortSystemUserByPriority(sysUsers []SystemUser)
Types ¶
type Asset ¶
type Asset struct { ID string `json:"id"` Name string `json:"name"` Hostname string `json:"hostname"` IP string `json:"ip"` Os string `json:"os"` Comment string `json:"comment"` Protocols []string `json:"protocols"` Platform string `json:"platform"` IsActive bool `json:"is_active"` }
func (*Asset) IsSupportProtocol ¶
func (*Asset) ProtocolPort ¶
type AssetLoginTicketInfo ¶
type AssetNodeSorter ¶
type AssetNodeSorter struct {
// contains filtered or unexported fields
}
func (*AssetNodeSorter) Len ¶
func (a *AssetNodeSorter) Len() int
func (*AssetNodeSorter) Less ¶
func (a *AssetNodeSorter) Less(i, j int) bool
func (*AssetNodeSorter) Swap ¶
func (a *AssetNodeSorter) Swap(i, j int)
type AssetUserInfo ¶
type ExpireInfo ¶
type ExpireInfo struct {
ExpireAt int64 `json:"expire_at"`
}
type LoginTicket ¶
type PaginationParam ¶
type PaginationResponse ¶
type Session ¶
type Session struct { ID string `json:"id"` User string `json:"user"` Asset string `json:"asset"` SystemUser string `json:"system_user"` LoginFrom string `json:"login_from"` RemoteAddr string `json:"remote_addr"` Protocol string `json:"protocol"` DateStart time.Time `json:"date_start"` UserID string `json:"user_id"` AssetID string `json:"asset_id"` SystemUserID string `json:"system_user_id"` }
type SystemUser ¶
type SystemUser struct { ID string `json:"id"` Username string `json:"username"` Priority int `json:"priority"` Protocol string `json:"protocol"` Comment string `json:"comment"` Password string `json:"-"` PrivateKey string `json:"-"` }
func (*SystemUser) IsProtocol ¶
func (s *SystemUser) IsProtocol(p string) bool
func (*SystemUser) String ¶
func (s *SystemUser) String() string
type TerminalConfig ¶
type TerminalConfig struct { AssetListPageSize string `json:"TERMINAL_ASSET_LIST_PAGE_SIZE"` HeaderTitle string `json:"TERMINAL_HEADER_TITLE"` HostKey string `json:"-"` //Minute MaxIdleTime int `json:"MAX_IDLE_TIME"` AssetListSortByIp bool `json:"TERMINAL_ASSET_LIST_SORT_BY_IP"` PasswordAuth bool `json:"TERMINAL_PASSWORD_AUTH"` PublicKeyAuth bool `json:"TERMINAL_PUBLIC_KEY_AUTH"` }
type TicketState ¶
type User ¶
type User struct { ID string `json:"id"` Username string `json:"name"` Role string `json:"role"` ExpireAt int64 OTPLevel int `json:"otp_level"` IsActive bool `json:"is_active"` NodeIDs []string AddrWhiteList []string }
USER TABLE
type UserClient ¶
func (*UserClient) SetOption ¶
func (u *UserClient) SetOption(setters ...UserClientOption)
type UserClientOption ¶
type UserClientOption func(*UserClient)
func UserClientPassword ¶
func UserClientPassword(password string) UserClientOption
func UserClientPublicKey ¶
func UserClientPublicKey(publicKey string) UserClientOption
func UserClientRemoteAddr ¶
func UserClientRemoteAddr(addr string) UserClientOption
Click to show internal directories.
Click to hide internal directories.