Documentation
¶
Index ¶
- type Attachment
- type Entity
- func (e *Entity) CreateAttachment(ctx context.Context, id, channelId, authorId, ttlSeconds, fileSize int64, ...) error
- func (e *Entity) DoneAttachment(ctx context.Context, id, channelId int64, contentType, url, previewURL *string, ...) error
- func (e *Entity) GetAttachment(ctx context.Context, id, channelId int64) (model.Attachment, error)
- func (e *Entity) ListDoneZeroSize(ctx context.Context) ([]model.Attachment, error)
- func (e *Entity) RemoveAttachment(ctx context.Context, id, channelId int64) error
- func (e *Entity) SelectAttachmentsByChannel(ctx context.Context, channelId int64, ids []int64) ([]model.Attachment, error)
- func (e *Entity) UpdateFileSize(ctx context.Context, id, channelId int64, fileSize int64) error
- func (e *Entity) UpdateName(ctx context.Context, id, channelId int64, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment interface {
CreateAttachment(ctx context.Context, id, channelId, authorId, ttlSeconds, fileSize int64, name string) error
RemoveAttachment(ctx context.Context, id, channelId int64) error
GetAttachment(ctx context.Context, id, channelId int64) (model.Attachment, error)
DoneAttachment(ctx context.Context, id, channelId int64, contentType, url, previewURL *string, height, width, fileSize *int64, name *string, authorId *int64) error
SelectAttachmentsByChannel(ctx context.Context, channelId int64, ids []int64) ([]model.Attachment, error)
UpdateFileSize(ctx context.Context, id, channelId int64, fileSize int64) error
ListDoneZeroSize(ctx context.Context) ([]model.Attachment, error)
UpdateName(ctx context.Context, id, channelId int64, name string) error
}
func New ¶
func New(c *db.CQLCon) Attachment
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
func (*Entity) CreateAttachment ¶
func (*Entity) DoneAttachment ¶
func (*Entity) GetAttachment ¶
func (*Entity) ListDoneZeroSize ¶ added in v1.5.0
func (*Entity) RemoveAttachment ¶
func (*Entity) SelectAttachmentsByChannel ¶ added in v1.7.0
func (*Entity) UpdateFileSize ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.