Documentation
¶
Index ¶
- Constants
- Variables
- type Author
- type Post
- type PublishParams
- type Repository
- type Service
- func (s *Service) Feed(ctx context.Context, viewerID string) ([]Post, error)
- func (s *Service) PostsByAlbum(ctx context.Context, viewerID, albumID string) ([]Post, error)
- func (s *Service) PostsByAuthor(ctx context.Context, viewerID, authorID string) ([]Post, error)
- func (s *Service) Publish(ctx context.Context, params PublishParams) (Post, error)
- type Visibility
Constants ¶
View Source
const ( MaxCaptionRunes = 2200 DefaultFeedSize = 50 )
Variables ¶
View Source
var ( ErrInvalidPost = errors.New("invalid post") )
Functions ¶
This section is empty.
Types ¶
type PublishParams ¶
type Repository ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository Repository) *Service
func (*Service) PostsByAlbum ¶
func (*Service) PostsByAuthor ¶
type Visibility ¶
type Visibility string
const ( VisibilityPrivate Visibility = "private" VisibilityCircle Visibility = "circle" VisibilityPublic Visibility = "public" )
func ValidateDraft ¶
func ValidateDraft(caption string, visibility Visibility) (string, Visibility, error)
Click to show internal directories.
Click to hide internal directories.