Documentation
¶
Index ¶
- Constants
- type ArchiveLogs
- type ArchiveLogsClient
- func (c *ArchiveLogsClient) DeleteArchiveLogs(archiveId int32) error
- func (c *ArchiveLogsClient) ListArchiveLog() ([]ArchiveLogs, error)
- func (c *ArchiveLogsClient) RetrieveArchiveLogsSetting(archiveId int32) (*ArchiveLogs, error)
- func (c *ArchiveLogsClient) SetupArchive(createArchive CreateOrUpdateArchiving) (*ArchiveLogs, error)
- func (c *ArchiveLogsClient) UpdateArchiveLogs(archiveId int32, updateArchive CreateOrUpdateArchiving) (*ArchiveLogs, error)
- type BlobSettings
- type CreateOrUpdateArchiving
- type S3IamCredentials
- type S3SecretCredentialsObject
- type S3StorageSettings
- type StorageSettings
Constants ¶
const ( StorageTypeS3 = "S3" StorageTypeBlob = "BLOB" CredentialsTypeIam = "IAM" CredentialsTypeKeys = "KEYS" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveLogs ¶
type ArchiveLogs struct { Id int32 `json:"id"` Settings StorageSettings `json:"settings"` }
type ArchiveLogsClient ¶
func New ¶
func New(apiToken string, baseUrl string) (*ArchiveLogsClient, error)
New Creates a new entry point into the archive logs functions, accepts the user's logz.io API token and base url
func (*ArchiveLogsClient) DeleteArchiveLogs ¶
func (c *ArchiveLogsClient) DeleteArchiveLogs(archiveId int32) error
func (*ArchiveLogsClient) ListArchiveLog ¶
func (c *ArchiveLogsClient) ListArchiveLog() ([]ArchiveLogs, error)
ListArchiveLog Returns all the archives for logs 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 (*ArchiveLogsClient) RetrieveArchiveLogsSetting ¶
func (c *ArchiveLogsClient) RetrieveArchiveLogsSetting(archiveId int32) (*ArchiveLogs, error)
RetrieveArchiveLogsSetting gets an archive id and returns its settings or an error
func (*ArchiveLogsClient) SetupArchive ¶
func (c *ArchiveLogsClient) SetupArchive(createArchive CreateOrUpdateArchiving) (*ArchiveLogs, error)
SetupArchive receives archive settings, and sends it as api request to logz.io returns an error if occurred
func (*ArchiveLogsClient) UpdateArchiveLogs ¶
func (c *ArchiveLogsClient) UpdateArchiveLogs(archiveId int32, updateArchive CreateOrUpdateArchiving) (*ArchiveLogs, error)
UpdateArchiveLogs updates an existing logs archive
type BlobSettings ¶
type BlobSettings struct { TenantId string `json:"tenantId,omitempty"` // required ClientId string `json:"clientId,omitempty"` // required ClientSecret string `json:"clientSecret,omitempty"` // required AccountName string `json:"accountName,omitempty"` // required ContainerName string `json:"containerName,omitempty"` // required Path string `json:"path,omitempty"` }
BlobSettings - use when StorageType is BLOB
type CreateOrUpdateArchiving ¶
type CreateOrUpdateArchiving struct { StorageType string `json:"storageType"` // required Enabled *bool `json:"enabled,omitempty"` // boolean - defined as a pointer because omitempty automatically omits false value Compressed *bool `json:"compressed,omitempty"` // boolean - defined as a pointer because omitempty automatically omits false value AmazonS3StorageSettings *S3StorageSettings `json:"amazonS3StorageSettings,omitempty"` // Set as pointer so that on marshalling will omit empty AzureBlobStorageSettings *BlobSettings `json:"azureBlobStorageSettings,omitempty"` // Set as pointer so that on marshalling will omit empty }
type S3IamCredentials ¶
type S3IamCredentials struct { Arn string `json:"arn,omitempty"` // required ExternalId string `json:"externalId,omitempty"` // only in response }
S3IamCredentials - use when CredentialsType is IAM
type S3SecretCredentialsObject ¶
type S3SecretCredentialsObject struct { AccessKey string `json:"accessKey,omitempty"` // required SecretKey string `json:"secretKey,omitempty"` // required }
S3SecretCredentialsObject - use when CredentialsType is KEYS
type S3StorageSettings ¶
type S3StorageSettings struct { CredentialsType string `json:"credentialsType,omitempty"` // required Path string `json:"path,omitempty"` // required S3SecretCredentials *S3SecretCredentialsObject `json:"s3SecretCredentials,omitempty"` // Set as pointer so that on marshalling will omit empty S3IamCredentials *S3IamCredentials `json:"s3IamCredentials,omitempty"` // Set as pointer so that on marshalling will omit empty }
S3StorageSettings - use when StorageType is S3
type StorageSettings ¶
type StorageSettings struct { StorageType string `json:"storageType"` // required Enabled bool `json:"enabled"` Compressed bool `json:"compressed"` AmazonS3StorageSettings S3StorageSettings `json:"amazonS3StorageSettings"` AzureBlobStorageSettings BlobSettings `json:"azureBlobStorageSettings"` }