Source File
server_key.go
Belonging Package
github.com/limanmys/render-engine/app/models
package models
import (
)
// ServerKey Structure of the server keys
type ServerKey struct {
ID string `json:"id"`
Type string `json:"type"`
Data string `json:"data"`
ServerID string `json:"server_id"`
UserID string `json:"user_id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type KeyData struct {
ClientUsername string `json:"clientUsername"`
ClientPassword string `json:"clientPassword"`
KeyPort string `json:"key_port"`
}
func (ServerKey) () string {
return "server_keys"
}
func ( KeyData) ( *User, *Server) *Credentials {
:= helpers.Env("APP_KEY", "") + .ID + .ID
return &Credentials{
Username: aes256.Decrypt(.ClientUsername, ),
Key: aes256.Decrypt(.ClientPassword, ),
Port: .KeyPort,
}
}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |