Documentation ¶
Index ¶
- Constants
- 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 BlobArray
- type Client
- type Content
- type Filter
Constants ¶
View Source
const ( SizeMaximum = 100 * 1024 * 1024 StatusAvailable = "available" StatusCreated = "created" )
Variables ¶
This section is empty.
Functions ¶
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"` DeletedTime *time.Time `json:"deletedTime,omitempty" bson:"deletedTime,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) (BlobArray, error) Create(ctx context.Context, userID string, content *Content) (*Blob, error) DeleteAll(ctx context.Context, userID string) 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 }
func NewContent ¶
func NewContent() *Content
Click to show internal directories.
Click to hide internal directories.