Documentation
¶
Index ¶
- type AccountUtilizationSettings
- type AccountUtilizationSettingsCreateOrUpdate
- type AccountView
- type CreateOrUpdateSubAccount
- type DailyUsagesListObject
- type DetailedSubAccount
- type FieldError
- type LHDailyCount
- type SharingAccount
- type SubAccount
- type SubAccountClient
- func (c *SubAccountClient) CreateSubAccount(createSubAccount CreateOrUpdateSubAccount) (*SubAccountCreateResponse, error)
- func (c *SubAccountClient) DeleteSubAccount(subAccountId int64) error
- func (c *SubAccountClient) GetDetailedSubAccount(subAccountId int64) (*DetailedSubAccount, error)
- func (c *SubAccountClient) GetSubAccount(subAccountId int64) (*SubAccount, error)
- func (c *SubAccountClient) ListDetailedSubAccounts() ([]DetailedSubAccount, error)
- func (c *SubAccountClient) ListSubAccounts() ([]SubAccount, error)
- func (c *SubAccountClient) UpdateSubAccount(subAccountId int64, updateSubAccount CreateOrUpdateSubAccount) error
- type SubAccountCreateResponse
- type SubAccountRelationObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountUtilizationSettings ¶ added in v1.8.0
type AccountUtilizationSettingsCreateOrUpdate ¶ added in v1.8.0
type AccountView ¶ added in v1.8.0
type AccountView struct { AccountId int32 `json:"accountId"` AccountName string `json:"accountName"` AccountToken string `json:"accountToken"` Active bool `json:"active"` EsIndexPrefix string `json:"esIndexPrefix"` Flexible bool `json:"isFlexible"` ReservedDailyGB float32 `json:"reservedDailyGB"` MaxDailyGB float32 `json:"maxDailyGB"` RetentionDays int32 `json:"retentionDays"` }
type CreateOrUpdateSubAccount ¶ added in v1.8.0
type CreateOrUpdateSubAccount struct { Email string `json:"email,omitempty"` AccountName string `json:"accountName"` Flexible string `json:"isFlexible,omitempty"` // boolean ReservedDailyGB *float32 `json:"reservedDailyGB,omitempty"` MaxDailyGB *float32 `json:"maxDailyGB,omitempty"` RetentionDays int32 `json:"retentionDays"` Searchable string `json:"searchable,omitempty"` // boolean Accessible string `json:"accessible,omitempty"` // boolean SharingObjectsAccounts []int32 `json:"sharingObjectsAccounts"` DocSizeSetting string `json:"docSizeSetting"` // boolean UtilizationSettings AccountUtilizationSettingsCreateOrUpdate `json:"utilizationSettings"` }
type DailyUsagesListObject ¶ added in v1.8.0
type DailyUsagesListObject struct {
Usage []LHDailyCount `json:"usage"`
}
type DetailedSubAccount ¶ added in v1.8.0
type DetailedSubAccount struct { SubAccountRelation SubAccountRelationObject `json:"subAccountRelation"` Account AccountView `json:"account"` SharingObjectsAccounts []AccountView `json:"sharingObjectsAccounts"` UtilizationSettings AccountUtilizationSettings `json:"utilizationSettings"` DailyUsagesList DailyUsagesListObject `json:"dailyUsagesList"` DocSizeSetting bool `json:"docSizeSetting"` }
type FieldError ¶ added in v1.8.0
func (FieldError) Error ¶ added in v1.8.0
func (e FieldError) Error() string
type LHDailyCount ¶ added in v1.8.0
type SharingAccount ¶ added in v1.8.0
type SubAccount ¶
type SubAccount struct { AccountId int32 `json:"accountId"` Email string `json:"email"` AccountName string `json:"accountName"` Flexible bool `json:"isFlexible"` ReservedDailyGB float32 `json:"reservedDailyGB"` MaxDailyGB float32 `json:"maxDailyGB"` RetentionDays int32 `json:"retentionDays"` Searchable bool `json:"searchable"` Accessible bool `json:"accessible"` DocSizeSetting bool `json:"docSizeSetting"` SharingObjectsAccounts []SharingAccount `json:"sharingObjectsAccounts"` UtilizationSettings AccountUtilizationSettings `json:"utilizationSettings"` }
type SubAccountClient ¶
func New ¶
func New(apiToken string, baseUrl string) (*SubAccountClient, error)
Creates a new entry point into the sub-account functions, accepts the user's logz.io API token and account Id
func (*SubAccountClient) CreateSubAccount ¶
func (c *SubAccountClient) CreateSubAccount(createSubAccount CreateOrUpdateSubAccount) (*SubAccountCreateResponse, error)
CreateSubAccount creates sub account, return account's id & token if successful, an error otherwise
func (*SubAccountClient) DeleteSubAccount ¶
func (c *SubAccountClient) DeleteSubAccount(subAccountId int64) error
DeleteSubAccount deletes a sub account specified by its unique id, returns an error if a problem is encountered
func (*SubAccountClient) GetDetailedSubAccount ¶
func (c *SubAccountClient) GetDetailedSubAccount(subAccountId int64) (*DetailedSubAccount, error)
GetDetailedSubAccount returns a detailed sub-account given its unique identifier, an error otherwise
func (*SubAccountClient) GetSubAccount ¶
func (c *SubAccountClient) GetSubAccount(subAccountId int64) (*SubAccount, error)
GetSubAccount returns a sub account given its unique identifier, an error otherwise
func (*SubAccountClient) ListDetailedSubAccounts ¶ added in v1.8.0
func (c *SubAccountClient) ListDetailedSubAccounts() ([]DetailedSubAccount, error)
ListDetailedSubAccounts returns all the detailed sub-accounts in an array associated with the account identified by the supplied API token, returns an error if any problem occurs during the API call
func (*SubAccountClient) ListSubAccounts ¶
func (c *SubAccountClient) ListSubAccounts() ([]SubAccount, error)
ListSubAccounts returns all the sub-accounts in an array associated with the account identified by the supplied API token, returns an error if any problem occurs during the API call
func (*SubAccountClient) UpdateSubAccount ¶
func (c *SubAccountClient) UpdateSubAccount(subAccountId int64, updateSubAccount CreateOrUpdateSubAccount) error
type SubAccountCreateResponse ¶ added in v1.8.0
type SubAccountRelationObject ¶ added in v1.8.0
type SubAccountRelationObject struct { OwnerAccountId int32 `json:"ownerAccountId"` SubAccountId int32 `json:"subAccountId"` Searchable bool `json:"searchable"` Accessible bool `json:"accessible"` CreatedDate int64 `json:"createdDate"` LastUpdatedDate int64 `json:"lastUpdatedDate"` LastUpdaterUserId int32 `json:"lastUpdaterUserId"` Type string `json:"type"` }