Skip to content

Commit

Permalink
Merge pull request #61 from G-Core/feature/CDI-623-tf-support-s3-buck…
Browse files Browse the repository at this point in the history
…et-in-origin-group

CDI-623: add Auth S3 structs for Origin Group
  • Loading branch information
andrei-lukyanchyk authored Sep 9, 2024
2 parents 5a6dfa1 + 5dbf266 commit bf3abd4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions origingroups/origingroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ type OriginGroupService interface {

type GroupRequest struct {
Name string `json:"name"`
AuthType string `json:"auth_type,omitempty"`
UseNext bool `json:"use_next"`
Sources []SourceRequest `json:"sources"`
Sources []SourceRequest `json:"sources,omitempty"`
Auth *AuthS3 `json:"auth,omitempty"`
ProxyNextUpstream []string `json:"proxy_next_upstream"`
}

Expand All @@ -27,8 +29,10 @@ type SourceRequest struct {
type OriginGroup struct {
ID int64 `json:"id"`
Name string `json:"name"`
AuthType string `json:"auth_type,omitempty"`
UseNext bool `json:"use_next"`
Sources []Source `json:"sources"`
Sources []Source `json:"sources,omitempty"`
Auth *AuthS3 `json:"auth,omitempty"`
ProxyNextUpstream []string `json:"proxy_next_upstream"`
}

Expand All @@ -37,3 +41,12 @@ type Source struct {
Backup bool `json:"backup"`
Enabled bool `json:"enabled"`
}

type AuthS3 struct {
S3Type string `json:"s3_type"`
S3AccessKeyID string `json:"s3_access_key_id"`
S3SecretAccessKey string `json:"s3_secret_access_key"`
S3BucketName string `json:"s3_bucket_name"`
S3StorageHostname string `json:"s3_storage_hostname,omitempty"`
S3Region string `json:"s3_region,omitempty"`
}

0 comments on commit bf3abd4

Please sign in to comment.