mirror of
https://github.com/veops/oneterm.git
synced 2025-09-27 03:36:02 +08:00
21 lines
402 B
Go
21 lines
402 B
Go
package api
|
|
|
|
import (
|
|
gossh "github.com/gliderlabs/ssh"
|
|
)
|
|
|
|
type CoreInstance struct {
|
|
Auth *Auth
|
|
Asset *AssetCore
|
|
Session *gossh.Session
|
|
Audit *AuditCore
|
|
}
|
|
|
|
func NewCoreInstance(apiHost, token, secretKey string) *CoreInstance {
|
|
coreInstance := &CoreInstance{
|
|
Auth: NewAuthServer("", "", "", apiHost, token, secretKey),
|
|
Asset: NewAssetServer(apiHost, token),
|
|
}
|
|
return coreInstance
|
|
}
|