Documentation
¶
Index ¶
- Constants
- func CreateMsgArchive(ctx context.Context, db *sqlx.DB, task *ArchiveTask) error
- func UploadArchive(ctx context.Context, s3Client s3iface.S3API, bucket string, task *ArchiveTask) error
- func WriteArchiveToDB(ctx context.Context, db *sqlx.DB, task *ArchiveTask) error
- type ArchiveTask
- type ArchiveType
- type Config
- type DBArchive
- type DBOrg
Constants ¶
View Source
const ( FlowRunType = ArchiveType("flowrun") MessageType = ArchiveType("message") SessionType = ArchiveType("session") )
Variables ¶
This section is empty.
Functions ¶
func CreateMsgArchive ¶
func UploadArchive ¶
func WriteArchiveToDB ¶
Types ¶
type ArchiveTask ¶
type ArchiveTask struct { Org DBOrg ArchiveType ArchiveType StartDate time.Time EndDate time.Time ID int RecordCount int Filename string FileSize int64 FileHash string URL string BuildStart time.Time }
func GetArchiveTasks ¶
func GetArchiveTasks(ctx context.Context, db *sqlx.DB, org DBOrg, archiveType ArchiveType) ([]ArchiveTask, error)
type ArchiveType ¶
type ArchiveType string
type Config ¶
type Config struct { DB string `help:"the connection string for our database"` LogLevel string `help:"the log level, one of error, warn, info, debug"` SentryDSN string `help:"the sentry configuration to log errors to, if any"` S3Endpoint string `help:"the S3 endpoint we will write archives to"` S3Region string `help:"the S3 region we will write archives to"` S3Bucket string `help:"the S3 bucket we will write archives to"` S3DisableSSL bool `` /* 158-byte string literal not displayed */ S3ForcePathStyle bool `` /* 127-byte string literal not displayed */ AWSAccessKeyID string `help:"the access key id to use when authenticating S3"` AWSSecretAccessKey string `help:"the secret access key id to use when authenticating S3"` }
type DBArchive ¶
type DBArchive struct { ID int `db:"id"` ArchiveType string `db:"archive_type"` OrgID int `db:"org_id"` CreatedOn time.Time `db:"created_on"` ArchiveDuration int `db:"archive_duration"` StartDate time.Time `db:"start_date"` EndDate time.Time `db:"end_date"` RecordCount int `db:"record_count"` ArchiveSize int `db:"archive_size"` ArchiveHash string `db:"archive_hash"` ArchiveURL string `db:"archive_url"` IsPurged bool `db:"is_purged"` BuildTime int `db:"build_time"` }
Click to show internal directories.
Click to hide internal directories.