Documentation
¶
Index ¶
- Constants
- Variables
- type Postgres
- func (s *Postgres) AddClub(_ context.Context, c *domain.Club) (int, error)
- func (s *Postgres) AddClubPhotos(_ context.Context, p []domain.ClubPhoto) error
- func (p *Postgres) AddDefaultMedia(ctx context.Context, mediaID int) (int, error)
- func (p *Postgres) AddMediaFile(name, key string) (int, error)
- func (p *Postgres) AddMember(ctx context.Context, mem *domain.Member) (int, error)
- func (s *Postgres) AddOrgs(_ context.Context, orgs []domain.ClubOrg) error
- func (s *Postgres) DeleteClubPhoto(_ context.Context, id int) error
- func (s *Postgres) DeleteClubWithOrgs(_ context.Context, clubID int) error
- func (p *Postgres) DeleteDefaultMedia(ctx context.Context, id int) error
- func (p *Postgres) DeleteDocument(ctx context.Context, id int) (string, error)
- func (p *Postgres) DeleteDocumentCategory(_ context.Context, id int) error
- func (p *Postgres) DeleteEncounter(_ context.Context, id int) error
- func (p *Postgres) DeleteEvent(_ context.Context, id int) error
- func (p *Postgres) DeleteFeed(_ context.Context, id int) error
- func (p *Postgres) DeleteMediaFile(id int) error
- func (p *Postgres) DeleteMediaFiles(ctx context.Context, keys []string) error
- func (p *Postgres) DeleteMember(ctx context.Context, id int) error
- func (p *Postgres) GetActiveMainVideo(ctx context.Context) (*domain.MainVideo, error)
- func (s *Postgres) GetAllClub(_ context.Context) ([]domain.Club, error)
- func (s *Postgres) GetAllClubOrgs(_ context.Context) ([]domain.ClubOrg, error)
- func (p *Postgres) GetAllDefaultMedia(ctx context.Context) ([]domain.DefaultMedia, error)
- func (p *Postgres) GetAllDocumentCategories(_ context.Context) ([]domain.DocumentCategory, error)
- func (p *Postgres) GetAllDocumentKeys(_ context.Context) ([]string, error)
- func (p *Postgres) GetAllDocuments(_ context.Context) ([]domain.Document, error)
- func (p *Postgres) GetAllEvents(_ context.Context) ([]domain.Event, error)
- func (p *Postgres) GetAllFeed(_ context.Context) ([]domain.Feed, error)
- func (p *Postgres) GetAllMediaKeys(ctx context.Context) ([]string, error)
- func (p *Postgres) GetAllMembers(_ context.Context) ([]domain.Member, error)
- func (pgs *Postgres) GetClub(_ context.Context, id int) (*domain.Club, error)
- func (s *Postgres) GetClubMediaFiles(clubID int) ([]domain.ClubPhoto, error)
- func (s *Postgres) GetClubOrgs(_ context.Context, clubID int) ([]domain.ClubOrg, error)
- func (s *Postgres) GetClubSubOrgs(_ context.Context, clubID int) ([]domain.ClubOrg, error)
- func (s *Postgres) GetClubsByName(_ context.Context, name string) ([]domain.Club, error)
- func (s *Postgres) GetClubsByType(_ context.Context, type_ string) ([]domain.Club, error)
- func (s *Postgres) GetClubsOrgs(_ context.Context, clubIDs []int) ([]domain.ClubOrg, error)
- func (p *Postgres) GetDefautlMedia(ctx context.Context, id int) (*domain.DefaultMedia, error)
- func (p *Postgres) GetDocument(_ context.Context, id int) (*domain.Document, error)
- func (p *Postgres) GetDocumentCategory(_ context.Context, id int) (*domain.DocumentCategory, error)
- func (p *Postgres) GetDocumentsByCategory(_ context.Context, categoryID int) ([]domain.Document, error)
- func (p *Postgres) GetDocumentsByClubID(_ context.Context, clubID int) ([]domain.Document, error)
- func (p *Postgres) GetEvent(_ context.Context, id int) (*domain.Event, error)
- func (p *Postgres) GetEventsByRange(_ context.Context, from, to time.Time) ([]domain.Event, error)
- func (p *Postgres) GetFeed(_ context.Context, id int) (*domain.Feed, error)
- func (p *Postgres) GetFeedByTitle(_ context.Context, title string) ([]domain.Feed, error)
- func (p *Postgres) GetFeedEncounters(_ context.Context, id int) ([]domain.Encounter, error)
- func (p *Postgres) GetMediaFile(id int) (*domain.MediaFile, error)
- func (p *Postgres) GetMediaFileByKey(ctx context.Context, key string) (*domain.MediaFile, error)
- func (p *Postgres) GetMediaFiles(ids []int) (map[int]domain.MediaFile, error)
- func (p *Postgres) GetMember(ctx context.Context, id int) (*domain.Member, error)
- func (p *Postgres) GetMemberByLogin(_ context.Context, login string) (*domain.Member, error)
- func (p *Postgres) GetMemberHash(_ context.Context, login string) (string, error)
- func (p *Postgres) GetMembersByName(_ context.Context, name string) ([]domain.Member, error)
- func (s *Postgres) GetPhotoClubID(_ context.Context, photoID int) (int, error)
- func (p *Postgres) GetRandomDefaultMedia(ctx context.Context) (*domain.DefaultMedia, error)
- func (p *Postgres) GetUnusedMedia(ctx context.Context) ([]domain.MediaFile, error)
- func (p *Postgres) PostDocument(ctx context.Context, name, key string, clubId, categoryId int) error
- func (p *Postgres) PostDocumentCategory(_ context.Context, cat *domain.DocumentCategory) error
- func (p *Postgres) PostEncounter(_ context.Context, enc *domain.Encounter) error
- func (p *Postgres) PostEvent(_ context.Context, event *domain.Event) error
- func (p *Postgres) PostFeed(_ context.Context, feed *domain.Feed) error
- func (p *Postgres) PostMember(ctx context.Context, member *domain.Member) error
- func (s *Postgres) UpdateClub(_ context.Context, c *domain.Club, o []domain.ClubOrg) error
- func (s *Postgres) UpdateClubPhotos(_ context.Context, clubID int, p []domain.ClubPhoto) error
- func (p *Postgres) UpdateDefaultMedia(ctx context.Context, id, mediaID int) error
- func (p *Postgres) UpdateDocument(ctx context.Context, id int, name, key string, clubId, categoryId int) (string, error)
- func (p *Postgres) UpdateDocumentCategory(_ context.Context, cat *domain.DocumentCategory) error
- func (p *Postgres) UpdateEncounter(_ context.Context, enc *domain.Encounter) error
- func (p *Postgres) UpdateEvent(_ context.Context, event *domain.Event) error
- func (p *Postgres) UpdateFeed(_ context.Context, feed *domain.Feed) error
- func (p *Postgres) UpdateMediaFile(id int, name, key string) error
- func (p *Postgres) UpdateMember(ctx context.Context, member *domain.Member) error
Constants ¶
View Source
const NoParentClubID = 0
Variables ¶
View Source
var ( TextPostgresUniqueConstraintViolation = "postgres unique constraint violation" TextPostgresForeignKeyViolation = "postgres foreign key violation" TextPostgresNotFoundError = "postgres not found error" TextPostgresUnknownError = "postgres unknown error" )
View Source
var ( ErrPostgresUniqueConstraintViolation = errors.New(TextPostgresUniqueConstraintViolation) ErrPostgresForeignKeyViolation = errors.New(TextPostgresForeignKeyViolation) ErrPostgresUnknownError = errors.New(TextPostgresUnknownError) ErrPostgresNotFoundError = errors.New(TextPostgresNotFoundError) )
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
func (*Postgres) AddClubPhotos ¶
func (*Postgres) AddDefaultMedia ¶
func (*Postgres) DeleteClubPhoto ¶
func (*Postgres) DeleteClubWithOrgs ¶
func (*Postgres) DeleteDefaultMedia ¶
func (*Postgres) DeleteDocument ¶
func (*Postgres) DeleteDocumentCategory ¶
func (*Postgres) DeleteEncounter ¶
func (*Postgres) DeleteMediaFile ¶
func (*Postgres) DeleteMediaFiles ¶
func (*Postgres) GetActiveMainVideo ¶
func (*Postgres) GetAllClub ¶
func (*Postgres) GetAllClubOrgs ¶
func (*Postgres) GetAllDefaultMedia ¶
func (*Postgres) GetAllDocumentCategories ¶
func (*Postgres) GetAllDocumentKeys ¶
func (*Postgres) GetAllDocuments ¶
func (*Postgres) GetAllEvents ¶
func (*Postgres) GetAllFeed ¶
func (*Postgres) GetAllMediaKeys ¶
func (*Postgres) GetAllMembers ¶
func (*Postgres) GetClubMediaFiles ¶
func (*Postgres) GetClubOrgs ¶
func (*Postgres) GetClubSubOrgs ¶
func (*Postgres) GetClubsByName ¶
func (*Postgres) GetClubsByType ¶
func (*Postgres) GetClubsOrgs ¶
func (*Postgres) GetDefautlMedia ¶
func (*Postgres) GetDocument ¶
func (*Postgres) GetDocumentCategory ¶
func (*Postgres) GetDocumentsByCategory ¶
func (*Postgres) GetDocumentsByClubID ¶
func (*Postgres) GetEventsByRange ¶
func (*Postgres) GetFeedByTitle ¶
func (*Postgres) GetFeedEncounters ¶
func (*Postgres) GetMediaFileByKey ¶
func (*Postgres) GetMediaFiles ¶
func (*Postgres) GetMemberByLogin ¶
func (*Postgres) GetMemberHash ¶
func (*Postgres) GetMembersByName ¶
func (*Postgres) GetPhotoClubID ¶
func (*Postgres) GetRandomDefaultMedia ¶
func (*Postgres) GetUnusedMedia ¶
func (*Postgres) PostDocument ¶
func (*Postgres) PostDocumentCategory ¶
func (*Postgres) PostEncounter ¶
func (*Postgres) PostMember ¶
func (*Postgres) UpdateClub ¶
func (*Postgres) UpdateClubPhotos ¶
func (*Postgres) UpdateDefaultMedia ¶
func (*Postgres) UpdateDocument ¶
func (*Postgres) UpdateDocumentCategory ¶
func (*Postgres) UpdateEncounter ¶
func (*Postgres) UpdateEvent ¶
func (*Postgres) UpdateFeed ¶
func (*Postgres) UpdateMediaFile ¶
Click to show internal directories.
Click to hide internal directories.