Documentation ¶
Index ¶
- type APICaller
- type APIClient
- func (c *APIClient) CreateUserToken(email string, expiration time.Time) (string, error)
- func (c *APIClient) DeleteTarget(id string) (int, error)
- func (c *APIClient) GetTargetByID(id string, includeChildren bool) (types.TargetRef, error)
- func (c *APIClient) Init(url string)
- func (c *APIClient) InsertOrUpdateMonitor(monitor *types.Monitor) error
- func (c *APIClient) InsertOrUpdateTarget(target *types.Target, forceStatusUpdate bool) error
- func (c *APIClient) InsertRole(role *types.Role) error
- func (c *APIClient) ListMonitors(pageIndex int, pageSize int) ([]*types.Monitor, error)
- func (c *APIClient) ListRoles(pageIndex, pageSize int) ([]*types.Role, error)
- func (c *APIClient) ListTargets(filter string, pageIndex int, pageSize int) ([]*types.Target, error)
- func (c *APIClient) ListUsers(pageIndex, pageSize int) ([]*types.User, error)
- func (c *APIClient) Login(email string, password string) (string, error)
- func (c *APIClient) UpdateRole(role string, usersAdd, usersRemove []string) error
- func (c *APIClient) UpdateTargetStatus(id string, status int, statusDescription string) error
- type CallerMock
- func (c *CallerMock) GetTargetByID(id string, includeChildren bool) (types.TargetRef, error)
- func (c *CallerMock) Init(url string)
- func (c *CallerMock) InsertOrUpdateMonitor(monitor *types.Monitor) error
- func (c *CallerMock) InsertOrUpdateTarget(target *types.Target, forceStatusUpdate bool) error
- func (c *CallerMock) ListTargets(filter string, pageIndex int, pageSize int) ([]*types.Target, error)
- func (c *CallerMock) Login(email string, password string) (string, error)
- func (c *CallerMock) UpdateTargetStatus(id string, status int, statusDescription string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICaller ¶
type APICaller interface { CreateUserToken(email string, expiration time.Time) (string, error) DeleteTarget(string) (int, error) GetTargetByID(id string, includeChildren bool) (types.TargetRef, error) Init(string) InsertOrUpdateMonitor(*types.Monitor) error InsertOrUpdateTarget(target *types.Target, forceStatusUpdate bool) error InsertRole(*types.Role) error ListMonitors(int, int) ([]*types.Monitor, error) ListRoles(pageIndex, pageSize int) ([]*types.Role, error) ListTargets(string, int, int) ([]*types.Target, error) ListUsers(pageIndex, pageSize int) ([]*types.User, error) Login(string, string) (string, error) UpdateRole(role string, usersAdd, usersRemove []string) error UpdateTargetStatus(string, int, string) error }
APICaller interface
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient for calling Spyglass API.
func (*APIClient) CreateUserToken ¶
func (*APIClient) GetTargetByID ¶
UpdateTargetStatus operation
func (*APIClient) InsertOrUpdateMonitor ¶
InsertOrUpdateMonitor operation.
func (*APIClient) InsertOrUpdateTarget ¶
InsertOrUpdateTarget operation.
func (*APIClient) ListMonitors ¶
ListMonitors operation
func (*APIClient) ListTargets ¶
func (c *APIClient) ListTargets(filter string, pageIndex int, pageSize int) ([]*types.Target, error)
ListTargets operation
func (*APIClient) UpdateRole ¶
type CallerMock ¶
CallerMock API client mock
func (*CallerMock) GetTargetByID ¶
func (*CallerMock) InsertOrUpdateMonitor ¶
func (c *CallerMock) InsertOrUpdateMonitor(monitor *types.Monitor) error
InsertOrUpdateMonitor operation.
func (*CallerMock) InsertOrUpdateTarget ¶
func (c *CallerMock) InsertOrUpdateTarget(target *types.Target, forceStatusUpdate bool) error
InsertOrUpdateTarget operation.
func (*CallerMock) ListTargets ¶
func (c *CallerMock) ListTargets(filter string, pageIndex int, pageSize int) ([]*types.Target, error)
ListTargets operation
func (*CallerMock) Login ¶
func (c *CallerMock) Login(email string, password string) (string, error)
func (*CallerMock) UpdateTargetStatus ¶
func (c *CallerMock) UpdateTargetStatus(id string, status int, statusDescription string) error
UpdateTargetStatus operation
Click to show internal directories.
Click to hide internal directories.