Documentation
¶
Index ¶
- func AppCacheDir() (string, error)
- func PrettyPrintResponse(dict map[string]any)
- type AuthRequest
- type AuthToken
- type FindInstanceRequest
- type FindOptions
- type FindRule
- type MiriaClient
- func (m *MiriaClient) Authenticate(username string, password string) error
- func (m *MiriaClient) AuthenticateInteractive(force bool) error
- func (m *MiriaClient) AuthenticationCache() (string, error)
- func (m *MiriaClient) CheckAuthentication() error
- func (m *MiriaClient) Find(opt FindOptions, cout chan []SearchResult, cerr chan error)
- func (m *MiriaClient) Get(path string, authenticate bool) (map[string]any, error)
- func (m *MiriaClient) Post(path string, body any, authenticate bool) (map[string]any, error)
- type ObjectId
- type SearchResponse
- type SearchResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppCacheDir ¶
func PrettyPrintResponse ¶
Types ¶
type AuthRequest ¶
type FindInstanceRequest ¶
type FindOptions ¶
type MiriaClient ¶
type MiriaClient struct {
// contains filtered or unexported fields
}
func NewMiria ¶
func NewMiria(host string) *MiriaClient
func (*MiriaClient) Authenticate ¶
func (m *MiriaClient) Authenticate(username string, password string) error
Obtain token from username/password ////////////////////////////////////////
func (*MiriaClient) AuthenticateInteractive ¶
func (m *MiriaClient) AuthenticateInteractive(force bool) error
Interactive authentication /////////////////////////////////////////////////
func (*MiriaClient) AuthenticationCache ¶
func (m *MiriaClient) AuthenticationCache() (string, error)
Private method to cache token //////////////////////////////////////////////
func (*MiriaClient) CheckAuthentication ¶
func (m *MiriaClient) CheckAuthentication() error
Check if token exists and is still valid ///////////////////////////////////
func (*MiriaClient) Find ¶
func (m *MiriaClient) Find(opt FindOptions, cout chan []SearchResult, cerr chan error)
Find, meant to be used as a goroutine //////////////////////////////////////
type SearchResponse ¶
type SearchResponse struct {
Next string `json:"next"`
NextPage string `json:"nextPage"`
Previous any `json:"previous"`
PreviousPage any `json:"previousPage"`
Results []SearchResult `json:"results"`
}
type SearchResult ¶
type SearchResult struct {
InstanceBackupDate string `json:"instanceBackupDate"`
InstanceId int `json:"instanceId"`
ObjectId int `json:"objectId"`
ObjectName string `json:"objectName"`
ObjectPath string `json:"objectPath"`
ObjectSize uint64 `json:"objectSize"`
ObjectType string `json:"objectType"`
RepositoryId int `json:"repositoryId"`
}
Click to show internal directories.
Click to hide internal directories.