mirror of
				https://github.com/veops/oneterm.git
				synced 2025-10-31 19:02:39 +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
 | |
| }
 | 
