Documentation ¶
Index ¶
- Constants
- func ErrorDigestsNotEqual(value string, calculated string) error
- func ErrorValueStringAsIDNotValid(value string) error
- func IDValidator(value string, errorReporter structure.ErrorReporter)
- func IsValidID(value string) bool
- func NewID() string
- func Statuses() []string
- func ValidateID(value string) error
- type Blob
- type Blobs
- type Client
- type Content
- type Create
- type Filter
Constants ¶
View Source
const ( SizeMaximum = 100 * 1024 * 1024 StatusAvailable = "available" StatusCreated = "created" )
View Source
const ErrorCodeDigestsNotEqual = "digests-not-equal"
Variables ¶
This section is empty.
Functions ¶
func ErrorDigestsNotEqual ¶
func IDValidator ¶
func IDValidator(value string, errorReporter structure.ErrorReporter)
func ValidateID ¶
Types ¶
type Blob ¶
type Blob struct { ID *string `json:"id,omitempty" bson:"id,omitempty"` UserID *string `json:"userId,omitempty" bson:"userId,omitempty"` DigestMD5 *string `json:"digestMD5,omitempty" bson:"digestMD5,omitempty"` MediaType *string `json:"mediaType,omitempty" bson:"mediaType,omitempty"` Size *int `json:"size,omitempty" bson:"size,omitempty"` Status *string `json:"status,omitempty" bson:"status,omitempty"` CreatedTime *time.Time `json:"createdTime,omitempty" bson:"createdTime,omitempty"` ModifiedTime *time.Time `json:"modifiedTime,omitempty" bson:"modifiedTime,omitempty"` Revision *int `json:"revision,omitempty" bson:"revision,omitempty"` }
func (*Blob) Parse ¶
func (b *Blob) Parse(parser structure.ObjectParser)
type Client ¶
type Client interface { List(ctx context.Context, userID string, filter *Filter, pagination *page.Pagination) (Blobs, error) Create(ctx context.Context, userID string, create *Create) (*Blob, error) Get(ctx context.Context, id string) (*Blob, error) GetContent(ctx context.Context, id string) (*Content, error) Delete(ctx context.Context, id string, condition *request.Condition) (bool, error) }
type Content ¶
type Content struct { Body io.ReadCloser DigestMD5 *string MediaType *string Size *int }
func NewContent ¶
func NewContent() *Content
Click to show internal directories.
Click to hide internal directories.