Documentation
¶
Index ¶
- Constants
- type Metadata
- type PublishBytesRequest
- type PublishRequest
- type PublishResult
- type Store
- func (s Store) Cleanup(now time.Time) error
- func (s Store) EnsureSecret() error
- func (s Store) Publish(req PublishRequest) (PublishResult, error)
- func (s Store) PublishBytes(req PublishBytesRequest) (PublishResult, error)
- func (s Store) Read(artifactID string, maxBytes int64) (Metadata, []byte, error)
- func (s Store) ServeHTTP(w http.ResponseWriter, r *http.Request, prefix string)
Constants ¶
View Source
const ( DefaultRetention = 24 * time.Hour MaxRetention = 7 * 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct {
ArtifactID string `json:"artifact_id"`
Filename string `json:"filename"`
MimeType string `json:"mime_type"`
Size int64 `json:"size_bytes"`
SHA256 string `json:"sha256"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt time.Time `json:"expires_at"`
Archive bool `json:"archive"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
}
type PublishBytesRequest ¶
type PublishRequest ¶
type PublishResult ¶
type Store ¶
func (Store) EnsureSecret ¶
func (Store) Publish ¶
func (s Store) Publish(req PublishRequest) (PublishResult, error)
func (Store) PublishBytes ¶
func (s Store) PublishBytes(req PublishBytesRequest) (PublishResult, error)
Click to show internal directories.
Click to hide internal directories.