# README
Archive logs
Compatible with Logz.io's archive logs API. You can archive logs to an AWS S3 bucket or Azure Blob Storage. Archiving gives you the option to restore logs and query them after they have expired from your time-based account. To create a new S3 archive:
client, _ := archive_logs.New(apiToken, apiServerAddress)
secretCredentials := archive_logs.S3SecretCredentialsObject{
AccessKey: "some-access-key",
SecretKey: "some-secret-key",
}
storageSettings := archive_logs.S3StorageSettings{
CredentialsType: archive_logs.CredentialsTypeKeys,
Path: "some-path",
S3SecretCredentials: &secretCredentials,
}
var createArchive archive_logs.CreateOrUpdateArchiving
createArchive.Compressed = new(bool)
*createArchive.Compressed = true
createArchive.Enabled = new(bool)
*createArchive.Enabled = true
createArchive.StorageType = archive_logs.StorageTypeS3
archive, err := client.SetupArchive(createArchive)
function | func name |
---|---|
setup logs archive | func (c *ArchiveLogsClient) SetupArchive(createArchive CreateOrUpdateArchiving) (*ArchiveLogs, error) |
delete logs archive | func (c *ArchiveLogsClient) DeleteArchiveLogs(archiveId int32) error |
list logs archives | func (c *ArchiveLogsClient) ListArchiveLog() ([]ArchiveLogs, error) |
retrieve an archive | func (c *ArchiveLogsClient) RetrieveArchiveLogsSetting(archiveId int32) (*ArchiveLogs, error) |
update archives settings | func (c *ArchiveLogsClient) UpdateArchiveLogs(archiveId int32, updateArchive CreateOrUpdateArchiving) (*ArchiveLogs, error) |
# Functions
New Creates a new entry point into the archive logs functions, accepts the user's logz.io API token and base url.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
BlobSettings - use when StorageType is BLOB.
No description provided by the author
S3IamCredentials - use when CredentialsType is IAM.
S3SecretCredentialsObject - use when CredentialsType is KEYS.
S3StorageSettings - use when StorageType is S3.
No description provided by the author