|
|
@@ -15,6 +15,7 @@ type PublicStoreConfig interface { |
|
|
|
|
|
|
|
|
var _ = serder.UseTypeUnionInternallyTagged(types.Ref(types.NewTypeUnion[PublicStoreConfig]( |
|
|
var _ = serder.UseTypeUnionInternallyTagged(types.Ref(types.NewTypeUnion[PublicStoreConfig]( |
|
|
(*LocalPublicStorage)(nil), |
|
|
(*LocalPublicStorage)(nil), |
|
|
|
|
|
(*S3PublicStorage)(nil), |
|
|
)), "type") |
|
|
)), "type") |
|
|
|
|
|
|
|
|
type LocalPublicStorage struct { |
|
|
type LocalPublicStorage struct { |
|
|
@@ -31,3 +32,17 @@ func (s *LocalPublicStorage) GetPublicStoreType() string { |
|
|
func (s *LocalPublicStorage) String() string { |
|
|
func (s *LocalPublicStorage) String() string { |
|
|
return fmt.Sprintf("Local[LoadBase=%v]", s.LoadBase) |
|
|
return fmt.Sprintf("Local[LoadBase=%v]", s.LoadBase) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type S3PublicStorage struct { |
|
|
|
|
|
serder.Metadata `union:"S3"` |
|
|
|
|
|
Type string `json:"type"` |
|
|
|
|
|
LoadBase string `json:"loadBase"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s *S3PublicStorage) GetPublicStoreType() string { |
|
|
|
|
|
return "S3" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s *S3PublicStorage) String() string { |
|
|
|
|
|
return fmt.Sprintf("S3[LoadBase=%v]", s.LoadBase) |
|
|
|
|
|
} |