Documentation
¶
Index ¶
- Constants
- func GetVersion() string
- func IsAPIError(err error) bool
- type APIError
- type APIResponse
- type Apikey
- type CreateApikeyRequest
- type CreateSpaceRequest
- type CreateUserRequest
- type DatabaseConfig
- type DockerConfig
- type LinuxConfig
- type Role
- type RomaApiClient
- func (c *RomaApiClient) AddSpaceMember(spaceID uint, userID uint) error
- func (c *RomaApiClient) AddToBlacklist(ip string) error
- func (c *RomaApiClient) CreateApikey(req *CreateApikeyRequest) (*Apikey, error)
- func (c *RomaApiClient) CreateDatabase(config *DatabaseConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) CreateDocker(config *DockerConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) CreateLinux(config *LinuxConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) CreateResource(resourceType string, data []interface{}, role string, spaceID *uint) error
- func (c *RomaApiClient) CreateRole(role *Role) error
- func (c *RomaApiClient) CreateRouter(config *RouterConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) CreateSpace(req *CreateSpaceRequest) (*Space, error)
- func (c *RomaApiClient) CreateSwitch(config *SwitchConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) CreateUser(req *CreateUserRequest) (*User, error)
- func (c *RomaApiClient) DelApikey(id uint) error
- func (c *RomaApiClient) DelDatabase(id int64) error
- func (c *RomaApiClient) DelDocker(id int64) error
- func (c *RomaApiClient) DelLinux(id int64) error
- func (c *RomaApiClient) DelResource(resourceType string, ids []int64) error
- func (c *RomaApiClient) DelRole(id uint) error
- func (c *RomaApiClient) DelRouter(id int64) error
- func (c *RomaApiClient) DelSwitch(id int64) error
- func (c *RomaApiClient) DelUser(id uint) error
- func (c *RomaApiClient) ExecuteDatabaseQuery(id int64, query string) (map[string]interface{}, error)
- func (c *RomaApiClient) ExecuteDockerCommand(id int64, command string) (map[string]interface{}, error)
- func (c *RomaApiClient) ExecuteRouterCommand(id int64, command string) (map[string]interface{}, error)
- func (c *RomaApiClient) ExecuteSwitchCommand(id int64, command string) (map[string]interface{}, error)
- func (c *RomaApiClient) GenerateSSHKey() (map[string]interface{}, error)
- func (c *RomaApiClient) GetAccessLogs(username, resourceType string, limit int) (map[string]interface{}, error)
- func (c *RomaApiClient) GetAllBlacklists(page, pageSize int) (map[string]interface{}, error)
- func (c *RomaApiClient) GetApikey(id uint) (*Apikey, error)
- func (c *RomaApiClient) GetApikeys() ([]Apikey, error)
- func (c *RomaApiClient) GetAuditLogs(username, resourceType string, limit int) (map[string]interface{}, error)
- func (c *RomaApiClient) GetBlacklistByIP(ip string) (map[string]interface{}, error)
- func (c *RomaApiClient) GetCredentialLogs(username string, limit int) (map[string]interface{}, error)
- func (c *RomaApiClient) GetCurrentUser() (*User, error)
- func (c *RomaApiClient) GetDatabase(id int64) (*DatabaseConfig, error)
- func (c *RomaApiClient) GetDatabaseConnectionInfo(id int64) (map[string]interface{}, error)
- func (c *RomaApiClient) GetDatabaseTypes() ([]string, error)
- func (c *RomaApiClient) GetDatabases() ([]DatabaseConfig, error)
- func (c *RomaApiClient) GetDocker(id int64) (*DockerConfig, error)
- func (c *RomaApiClient) GetDockerConnectionInfo(id int64) (map[string]interface{}, error)
- func (c *RomaApiClient) GetDockers() ([]DockerConfig, error)
- func (c *RomaApiClient) GetHealth() (map[string]interface{}, error)
- func (c *RomaApiClient) GetIPInfo(ip string) (map[string]interface{}, error)
- func (c *RomaApiClient) GetLinux(id int64) (*LinuxConfig, error)
- func (c *RomaApiClient) GetLinuxs() ([]LinuxConfig, error)
- func (c *RomaApiClient) GetMySSHKey() (map[string]interface{}, error)
- func (c *RomaApiClient) GetResource(resourceType string) ([]map[string]interface{}, error)
- func (c *RomaApiClient) GetResourceByID(resourceType string, id int64) (map[string]interface{}, error)
- func (c *RomaApiClient) GetRole(id uint) (*Role, error)
- func (c *RomaApiClient) GetRoles() ([]Role, error)
- func (c *RomaApiClient) GetRouter(id int64) (*RouterConfig, error)
- func (c *RomaApiClient) GetRouterConnectionInfo(id int64) (map[string]interface{}, error)
- func (c *RomaApiClient) GetRouters() ([]RouterConfig, error)
- func (c *RomaApiClient) GetSpace(id uint) (*Space, error)
- func (c *RomaApiClient) GetSpaces() ([]Space, error)
- func (c *RomaApiClient) GetSwitch(id int64) (*SwitchConfig, error)
- func (c *RomaApiClient) GetSwitchConnectionInfo(id int64) (map[string]interface{}, error)
- func (c *RomaApiClient) GetSwitches() ([]SwitchConfig, error)
- func (c *RomaApiClient) GetSystemInfo() (*SystemInfo, error)
- func (c *RomaApiClient) GetUser(id uint) (*User, error)
- func (c *RomaApiClient) GetUsers() ([]User, error)
- func (c *RomaApiClient) GetWindowsConnectionInfo(id int64) (map[string]interface{}, error)
- func (c *RomaApiClient) RemoveFromBlacklist(ip string) error
- func (c *RomaApiClient) RemoveSpaceMember(spaceID uint, userID uint) error
- func (c *RomaApiClient) UpdateDatabase(config *DatabaseConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) UpdateDocker(config *DockerConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) UpdateLinux(config *LinuxConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) UpdateProfile(req *CreateUserRequest) (*User, error)
- func (c *RomaApiClient) UpdateResource(resourceType string, data []interface{}, role string, spaceID *uint) error
- func (c *RomaApiClient) UpdateRole(id uint, role *Role) error
- func (c *RomaApiClient) UpdateRouter(config *RouterConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) UpdateSwitch(config *SwitchConfig, role string, spaceID *uint) error
- func (c *RomaApiClient) UpdateUser(id uint, req *CreateUserRequest) (*User, error)
- func (c *RomaApiClient) UploadSSHKey(publicKey string) error
- type RomaApiClientOptions
- type RouterConfig
- type Space
- type SwitchConfig
- type SystemInfo
- type User
- type WindowsConfig
Constants ¶
View Source
const Version = "0.1.0"
Version is the current version of the SDK
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIError ¶
APIError represents an error returned by the API
func AsAPIError ¶
AsAPIError converts an error to APIError if possible
type APIResponse ¶
type CreateApikeyRequest ¶
type CreateSpaceRequest ¶
type CreateUserRequest ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
ID int64 `json:"ID"`
DatabaseNick string `json:"DATABASE_NICK"`
DatabaseName string `json:"DATABASE_NAME"`
DatabaseType string `json:"DATABASE_TYPE"`
Port int `json:"PORT"`
IPv4Pub string `json:"IPV4_PUB"`
IPv4Priv string `json:"IPV4_PRIV"`
IPv6 string `json:"IPV6"`
Password string `json:"PASSWORD"`
Username string `json:"USERNAME"`
PrivateKey string `json:"PRIVATE_KEY"`
Description string `json:"DESCRIPTION"`
CreatedAt time.Time `json:"CREATED_AT"`
UpdatedAt time.Time `json:"UPDATED_AT"`
}
type DockerConfig ¶
type DockerConfig struct {
ID int64 `json:"ID"`
ContainerName string `json:"CONTAINER_NAME"`
Port int `json:"PORT"`
IPv4Priv string `json:"IPV4_PRIV"`
IPv6 string `json:"IPV6"`
PortIPv6 int `json:"PORT_IPV6"`
Password string `json:"PASSWORD"`
Username string `json:"USERNAME"`
PrivateKey string `json:"PRIVATE_KEY"`
Description string `json:"DESCRIPTION"`
CreatedAt time.Time `json:"CREATED_AT"`
UpdatedAt time.Time `json:"UPDATED_AT"`
}
type LinuxConfig ¶
type LinuxConfig struct {
ID int64 `json:"ID"`
Hostname string `json:"HOSTNAME"`
Port int `json:"PORT"`
IPv4Pub string `json:"IPV4_PUB"`
PortActual int `json:"PORT_ACTUAL"`
IPv4Priv string `json:"IPV4_PRIV"`
IPv6 string `json:"IPV6"`
PortIPv6 int `json:"PORT_IPV6"`
Password string `json:"PASSWORD"`
Username string `json:"USERNAME"`
PrivateKey string `json:"PRIVATE_KEY"`
Description string `json:"DESCRIPTION"`
CreatedAt time.Time `json:"CREATED_AT"`
UpdatedAt time.Time `json:"UPDATED_AT"`
}
type RomaApiClient ¶
type RomaApiClient struct {
// contains filtered or unexported fields
}
func NewRomaApiClient ¶
func NewRomaApiClient(opts RomaApiClientOptions) *RomaApiClient
func (*RomaApiClient) AddSpaceMember ¶
func (c *RomaApiClient) AddSpaceMember(spaceID uint, userID uint) error
func (*RomaApiClient) AddToBlacklist ¶
func (c *RomaApiClient) AddToBlacklist(ip string) error
func (*RomaApiClient) CreateApikey ¶
func (c *RomaApiClient) CreateApikey(req *CreateApikeyRequest) (*Apikey, error)
func (*RomaApiClient) CreateDatabase ¶
func (c *RomaApiClient) CreateDatabase(config *DatabaseConfig, role string, spaceID *uint) error
func (*RomaApiClient) CreateDocker ¶
func (c *RomaApiClient) CreateDocker(config *DockerConfig, role string, spaceID *uint) error
func (*RomaApiClient) CreateLinux ¶
func (c *RomaApiClient) CreateLinux(config *LinuxConfig, role string, spaceID *uint) error
func (*RomaApiClient) CreateResource ¶
func (c *RomaApiClient) CreateResource(resourceType string, data []interface{}, role string, spaceID *uint) error
func (*RomaApiClient) CreateRole ¶
func (c *RomaApiClient) CreateRole(role *Role) error
func (*RomaApiClient) CreateRouter ¶
func (c *RomaApiClient) CreateRouter(config *RouterConfig, role string, spaceID *uint) error
func (*RomaApiClient) CreateSpace ¶
func (c *RomaApiClient) CreateSpace(req *CreateSpaceRequest) (*Space, error)
func (*RomaApiClient) CreateSwitch ¶
func (c *RomaApiClient) CreateSwitch(config *SwitchConfig, role string, spaceID *uint) error
func (*RomaApiClient) CreateUser ¶
func (c *RomaApiClient) CreateUser(req *CreateUserRequest) (*User, error)
func (*RomaApiClient) DelApikey ¶
func (c *RomaApiClient) DelApikey(id uint) error
func (*RomaApiClient) DelDatabase ¶
func (c *RomaApiClient) DelDatabase(id int64) error
func (*RomaApiClient) DelDocker ¶
func (c *RomaApiClient) DelDocker(id int64) error
func (*RomaApiClient) DelLinux ¶
func (c *RomaApiClient) DelLinux(id int64) error
func (*RomaApiClient) DelResource ¶
func (c *RomaApiClient) DelResource(resourceType string, ids []int64) error
func (*RomaApiClient) DelRole ¶
func (c *RomaApiClient) DelRole(id uint) error
func (*RomaApiClient) DelRouter ¶
func (c *RomaApiClient) DelRouter(id int64) error
func (*RomaApiClient) DelSwitch ¶
func (c *RomaApiClient) DelSwitch(id int64) error
func (*RomaApiClient) DelUser ¶
func (c *RomaApiClient) DelUser(id uint) error
func (*RomaApiClient) ExecuteDatabaseQuery ¶
func (c *RomaApiClient) ExecuteDatabaseQuery(id int64, query string) (map[string]interface{}, error)
func (*RomaApiClient) ExecuteDockerCommand ¶
func (c *RomaApiClient) ExecuteDockerCommand(id int64, command string) (map[string]interface{}, error)
func (*RomaApiClient) ExecuteRouterCommand ¶
func (c *RomaApiClient) ExecuteRouterCommand(id int64, command string) (map[string]interface{}, error)
func (*RomaApiClient) ExecuteSwitchCommand ¶
func (c *RomaApiClient) ExecuteSwitchCommand(id int64, command string) (map[string]interface{}, error)
func (*RomaApiClient) GenerateSSHKey ¶
func (c *RomaApiClient) GenerateSSHKey() (map[string]interface{}, error)
func (*RomaApiClient) GetAccessLogs ¶
func (c *RomaApiClient) GetAccessLogs(username, resourceType string, limit int) (map[string]interface{}, error)
func (*RomaApiClient) GetAllBlacklists ¶
func (c *RomaApiClient) GetAllBlacklists(page, pageSize int) (map[string]interface{}, error)
func (*RomaApiClient) GetApikeys ¶
func (c *RomaApiClient) GetApikeys() ([]Apikey, error)
func (*RomaApiClient) GetAuditLogs ¶
func (c *RomaApiClient) GetAuditLogs(username, resourceType string, limit int) (map[string]interface{}, error)
func (*RomaApiClient) GetBlacklistByIP ¶
func (c *RomaApiClient) GetBlacklistByIP(ip string) (map[string]interface{}, error)
func (*RomaApiClient) GetCredentialLogs ¶
func (c *RomaApiClient) GetCredentialLogs(username string, limit int) (map[string]interface{}, error)
func (*RomaApiClient) GetCurrentUser ¶
func (c *RomaApiClient) GetCurrentUser() (*User, error)
func (*RomaApiClient) GetDatabase ¶
func (c *RomaApiClient) GetDatabase(id int64) (*DatabaseConfig, error)
func (*RomaApiClient) GetDatabaseConnectionInfo ¶
func (c *RomaApiClient) GetDatabaseConnectionInfo(id int64) (map[string]interface{}, error)
func (*RomaApiClient) GetDatabaseTypes ¶
func (c *RomaApiClient) GetDatabaseTypes() ([]string, error)
func (*RomaApiClient) GetDatabases ¶
func (c *RomaApiClient) GetDatabases() ([]DatabaseConfig, error)
func (*RomaApiClient) GetDocker ¶
func (c *RomaApiClient) GetDocker(id int64) (*DockerConfig, error)
func (*RomaApiClient) GetDockerConnectionInfo ¶
func (c *RomaApiClient) GetDockerConnectionInfo(id int64) (map[string]interface{}, error)
func (*RomaApiClient) GetDockers ¶
func (c *RomaApiClient) GetDockers() ([]DockerConfig, error)
func (*RomaApiClient) GetHealth ¶
func (c *RomaApiClient) GetHealth() (map[string]interface{}, error)
func (*RomaApiClient) GetIPInfo ¶
func (c *RomaApiClient) GetIPInfo(ip string) (map[string]interface{}, error)
func (*RomaApiClient) GetLinux ¶
func (c *RomaApiClient) GetLinux(id int64) (*LinuxConfig, error)
func (*RomaApiClient) GetLinuxs ¶
func (c *RomaApiClient) GetLinuxs() ([]LinuxConfig, error)
func (*RomaApiClient) GetMySSHKey ¶
func (c *RomaApiClient) GetMySSHKey() (map[string]interface{}, error)
func (*RomaApiClient) GetResource ¶
func (c *RomaApiClient) GetResource(resourceType string) ([]map[string]interface{}, error)
func (*RomaApiClient) GetResourceByID ¶
func (c *RomaApiClient) GetResourceByID(resourceType string, id int64) (map[string]interface{}, error)
func (*RomaApiClient) GetRoles ¶
func (c *RomaApiClient) GetRoles() ([]Role, error)
func (*RomaApiClient) GetRouter ¶
func (c *RomaApiClient) GetRouter(id int64) (*RouterConfig, error)
func (*RomaApiClient) GetRouterConnectionInfo ¶
func (c *RomaApiClient) GetRouterConnectionInfo(id int64) (map[string]interface{}, error)
func (*RomaApiClient) GetRouters ¶
func (c *RomaApiClient) GetRouters() ([]RouterConfig, error)
func (*RomaApiClient) GetSpaces ¶
func (c *RomaApiClient) GetSpaces() ([]Space, error)
func (*RomaApiClient) GetSwitch ¶
func (c *RomaApiClient) GetSwitch(id int64) (*SwitchConfig, error)
func (*RomaApiClient) GetSwitchConnectionInfo ¶
func (c *RomaApiClient) GetSwitchConnectionInfo(id int64) (map[string]interface{}, error)
func (*RomaApiClient) GetSwitches ¶
func (c *RomaApiClient) GetSwitches() ([]SwitchConfig, error)
func (*RomaApiClient) GetSystemInfo ¶
func (c *RomaApiClient) GetSystemInfo() (*SystemInfo, error)
func (*RomaApiClient) GetUsers ¶
func (c *RomaApiClient) GetUsers() ([]User, error)
func (*RomaApiClient) GetWindowsConnectionInfo ¶
func (c *RomaApiClient) GetWindowsConnectionInfo(id int64) (map[string]interface{}, error)
func (*RomaApiClient) RemoveFromBlacklist ¶
func (c *RomaApiClient) RemoveFromBlacklist(ip string) error
func (*RomaApiClient) RemoveSpaceMember ¶
func (c *RomaApiClient) RemoveSpaceMember(spaceID uint, userID uint) error
func (*RomaApiClient) UpdateDatabase ¶
func (c *RomaApiClient) UpdateDatabase(config *DatabaseConfig, role string, spaceID *uint) error
func (*RomaApiClient) UpdateDocker ¶
func (c *RomaApiClient) UpdateDocker(config *DockerConfig, role string, spaceID *uint) error
func (*RomaApiClient) UpdateLinux ¶
func (c *RomaApiClient) UpdateLinux(config *LinuxConfig, role string, spaceID *uint) error
func (*RomaApiClient) UpdateProfile ¶
func (c *RomaApiClient) UpdateProfile(req *CreateUserRequest) (*User, error)
func (*RomaApiClient) UpdateResource ¶
func (c *RomaApiClient) UpdateResource(resourceType string, data []interface{}, role string, spaceID *uint) error
func (*RomaApiClient) UpdateRole ¶
func (c *RomaApiClient) UpdateRole(id uint, role *Role) error
func (*RomaApiClient) UpdateRouter ¶
func (c *RomaApiClient) UpdateRouter(config *RouterConfig, role string, spaceID *uint) error
func (*RomaApiClient) UpdateSwitch ¶
func (c *RomaApiClient) UpdateSwitch(config *SwitchConfig, role string, spaceID *uint) error
func (*RomaApiClient) UpdateUser ¶
func (c *RomaApiClient) UpdateUser(id uint, req *CreateUserRequest) (*User, error)
func (*RomaApiClient) UploadSSHKey ¶
func (c *RomaApiClient) UploadSSHKey(publicKey string) error
type RomaApiClientOptions ¶
type RouterConfig ¶
type RouterConfig struct {
ID int64 `json:"ID"`
RouterName string `json:"ROUTER_NAME"`
WebPort int `json:"WEB_PORT"`
WebUsername string `json:"WEB_USERNAME"`
WebPassword string `json:"WEB_PASSWORD"`
Port int `json:"PORT"`
IPv4Pub string `json:"IPV4_PUB"`
IPv4Priv string `json:"IPV4_PRIV"`
IPv6 string `json:"IPV6"`
Password string `json:"PASSWORD"`
Username string `json:"USERNAME"`
PrivateKey string `json:"PRIVATE_KEY"`
Description string `json:"DESCRIPTION"`
CreatedAt time.Time `json:"CREATED_AT"`
UpdatedAt time.Time `json:"UPDATED_AT"`
}
type SwitchConfig ¶
type SwitchConfig struct {
ID int64 `json:"ID"`
SwitchName string `json:"SWITCH_NAME"`
Port int `json:"PORT"`
IPv4Pub string `json:"IPV4_PUB"`
PortActual int `json:"PORT_ACTUAL"`
IPv4Priv string `json:"IPV4_PRIV"`
IPv6 string `json:"IPV6"`
PortIPv6 int `json:"PORT_IPV6"`
Password string `json:"PASSWORD"`
Username string `json:"USERNAME"`
Description string `json:"DESCRIPTION"`
CreatedAt time.Time `json:"CREATED_AT"`
UpdatedAt time.Time `json:"UPDATED_AT"`
}
type SystemInfo ¶
type WindowsConfig ¶
type WindowsConfig struct {
ID int64 `json:"ID"`
Hostname string `json:"HOSTNAME"`
Port int `json:"PORT"`
IPv4Pub string `json:"IPV4_PUB"`
IPv4Priv string `json:"IPV4_PRIV"`
IPv6 string `json:"IPV6"`
PortIPv6 int `json:"PORT_IPV6"`
Password string `json:"PASSWORD"`
Username string `json:"USERNAME"`
Description string `json:"DESCRIPTION"`
CreatedAt time.Time `json:"CREATED_AT"`
UpdatedAt time.Time `json:"UPDATED_AT"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.