Documentation ¶
Index ¶
Constants ¶
View Source
const MaxSizeBatchPin = 100
Variables ¶
View Source
var ( ErrPinNotAccess = errors.New("pin is not available") ErrPinDeleted = errors.New("pin has been deleted") ErrForbiddenAction = errors.New("this action is not available to the user") ErrEmptyBatch = errors.New("an empty batch was received") ErrSizeBatch = errors.New("the batch size exceeds the maximum possible") )
View Source
var ErrBadMIMEType = errors.New("bad mime type")
Functions ¶
Types ¶
type PinUpdateData ¶
type PinUpdateData struct { Title *string `json:"title"` Description *string `json:"description"` Public *bool `json:"public"` Tags []string `json:"tags"` }
func (PinUpdateData) MarshalEasyJSON ¶
func (v PinUpdateData) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PinUpdateData) MarshalJSON ¶
func (v PinUpdateData) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PinUpdateData) UnmarshalEasyJSON ¶
func (v *PinUpdateData) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PinUpdateData) UnmarshalJSON ¶
func (v *PinUpdateData) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Usecase ¶
type Usecase interface { ViewFeedPin(ctx context.Context, userID int, cfg pin.FeedPinConfig) (pin.FeedPin, error) CreateNewPin(ctx context.Context, pin *entity.Pin, mimeTypePicture string, sizePicture int64, picture io.Reader) error DeletePinFromUser(ctx context.Context, pinID, userID int) error SetLikeFromUser(ctx context.Context, pinID, userID int) (int, error) CheckUserHasSetLike(ctx context.Context, pinID, userID int) (bool, error) DeleteLikeFromUser(ctx context.Context, pinID, userID int) (int, error) EditPinByID(ctx context.Context, pinID, userID int, updateData *PinUpdateData) error ViewAnPin(ctx context.Context, pinID, userID int) (*entity.Pin, error) IsAvailablePinForFixOnBoard(ctx context.Context, pinID, userID int) error IsAvailableBatchPinForFixOnBoard(ctx context.Context, pinID []int, userID int) error }
Click to show internal directories.
Click to hide internal directories.