{"modulePath":"github.com/COMTOP1/api","version":"v0.0.0-20261013160217-6eca15d21c26","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package handler\n\n## Types\n\n```go\ntype Affiliation struct {\n\tId       uint64 `json:\"id\"`\n\tName     string `json:\"name\"`\n\tWebsite  string `json:\"website\"`\n\tFileName string `json:\"file_name\"`\n}\n```\n\n```go\ntype Document struct {\n\tId       uint64 `json:\"id\"`\n\tName     string `json:\"name\"`\n\tFileName string `json:\"file_name\"`\n}\n```\n\n```go\ntype Image struct {\n\tId       uint64 `json:\"id\"`\n\tFileName string `json:\"file_name\"`\n\tCaption  string `json:\"caption\"`\n}\n```\n\n```go\ntype News struct {\n\tId       uint64 `json:\"id\"`\n\tTitle    string `json:\"title\"`\n\tFileName string `json:\"file_name\"`\n\tContent  string `json:\"content\"`\n\tDate     int64  `json:\"date\"`\n}\n```\n\n```go\ntype Player struct {\n\tId          uint64 `json:\"id\"`\n\tName        string `json:\"name\"`\n\tFileName    string `json:\"file_name\"`\n\tDateOfBirth int64  `json:\"date_of_birth\"`\n\tCaptain     bool   `json:\"captain\"`\n\tTeam        uint64 `json:\"team\"`\n}\n```\n\n```go\ntype Programme struct {\n\tId                uint64 `json:\"id\"`\n\tName              string `json:\"name\"`\n\tFileName          string `json:\"file_name\"`\n\tDateOfProgramme   int64  `json:\"date_of_programme\"`\n\tProgrammeSeasonId uint64 `json:\"programme_season_id\"`\n}\n```\n\n```go\ntype ProgrammeSeason struct {\n\tId     uint64 `json:\"id\"`\n\tSeason string `json:\"season\"`\n}\n```\n\n```go\ntype Session struct {\n\t// contains filtered or unexported fields\n}\n```\nSession represents an open API session.\n\n```go\nfunc NewSession(baseURL string) (*Session, error)\n```\nNewSession constructs a new Session with a given url.\n\n```go\nfunc (s *Session) AddAffiliation(affiliation Affiliation, token string) (a Affiliation, err error)\n```\n\n```go\nfunc (s *Session) AddDocument(document Document, token string) (d Document, err error)\n```\n\n```go\nfunc (s *Session) AddImage(image Image, token string) (i Image, err error)\n```\n\n```go\nfunc (s *Session) AddNews(news News, token string) (n News, err error)\n```\n\n```go\nfunc (s *Session) AddPlayer(player Player, token string) (p Player, err error)\n```\n\n```go\nfunc (s *Session) AddProgramme(p1 Programme, token string) (p Programme, err error)\n```\n\n```go\nfunc (s *Session) AddProgrammeSeason(programmeSeason ProgrammeSeason, token string) (p ProgrammeSeason, err error)\n```\n\n```go\nfunc (s *Session) AddSponsor(sp1 Sponsor, token string) (sp Sponsor, err error)\n```\n\n```go\nfunc (s *Session) AddTeam(team Team, token string) (t Team, err error)\n```\n\n```go\nfunc (s *Session) AddUser(user UserFull, token string) (u UserFull, err error)\n```\n\n```go\nfunc (s *Session) AddWhatsOn(whatsOn WhatsOn, token string) (w WhatsOn, err error)\n```\n\n```go\nfunc (s *Session) DeleteAffiliation(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteDocument(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteImage(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteNews(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeletePlayer(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteProgramme(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteProgrammeSeason(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteSponsor(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteTeam(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteUserFromEmail(email, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteUserFromId(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) DeleteWhatsOn(id uint64, token string) (err error)\n```\n\n```go\nfunc (s *Session) EditDocument(document Document, token string) (d Document, err error)\n```\n\n```go\nfunc (s *Session) EditNews(news News, token string) (p News, err error)\n```\n\n```go\nfunc (s *Session) EditPlayer(player Player, token string) (p Player, err error)\n```\n\n```go\nfunc (s *Session) EditProgrammeSeason(programmeSeason ProgrammeSeason, token string) (p ProgrammeSeason, err error)\n```\n\n```go\nfunc (s *Session) EditSponsor(sp1 Sponsor, token string) (sp Sponsor, err error)\n```\n\n```go\nfunc (s *Session) EditTeam(team Team, token string) (t Team, err error)\n```\n\n```go\nfunc (s *Session) EditUser(user UserFull, token string) (u UserFull, err error)\n```\n\n```go\nfunc (s *Session) EditWhatsOn(whatsOn WhatsOn, token string) (w WhatsOn, err error)\n```\n\n```go\nfunc (s *Session) GetAffiliationById(id uint64) (a Affiliation, err error)\n```\n\n```go\nfunc (s *Session) GetDocumentById(id uint64) (d Document, err error)\n```\n\n```go\nfunc (s *Session) GetImageById(id uint64) (i Image, err error)\n```\n\n```go\nfunc (s *Session) GetNewsById(id uint64) (n News, err error)\n```\n\n```go\nfunc (s *Session) GetNewsLatest() (n News, err error)\n```\n\n```go\nfunc (s *Session) GetPlayerById(id uint64) (p Player, err error)\n```\n\n```go\nfunc (s *Session) GetProgrammeById(id uint64) (p Programme, err error)\n```\n\n```go\nfunc (s *Session) GetProgrammeSeasonById(id uint64) (p ProgrammeSeason, err error)\n```\n\n```go\nfunc (s *Session) GetSponsorById(id uint64) (sp Sponsor, err error)\n```\n\n```go\nfunc (s *Session) GetTeamById(id uint64) (t Team, err error)\n```\n\n```go\nfunc (s *Session) GetUserByEmail(email, token string) (u User, err error)\n```\n\n```go\nfunc (s *Session) GetUserByEmailFull(email, token string) (u UserFull, err error)\n```\n\n```go\nfunc (s *Session) GetUserById(id uint64, token string) (u User, err error)\n```\n\n```go\nfunc (s *Session) GetUserByIdFull(id uint64, token string) (u UserFull, err error)\n```\n\n```go\nfunc (s *Session) GetUserByToken(token string) (u User, err error)\n```\n\n```go\nfunc (s *Session) GetUserByTokenFull(token string) (u UserFull, err error)\n```\n\n```go\nfunc (s *Session) GetWhatsOnById(id uint64) (w WhatsOn, err error)\n```\n\n```go\nfunc (s *Session) GetWhatsOnLatest() (w WhatsOn, err error)\n```\n\n```go\nfunc (s *Session) ListActiveTeams() (t []Team, err error)\n```\n\n```go\nfunc (s *Session) ListAllAffiliations() (a []Affiliation, err error)\n```\n\n```go\nfunc (s *Session) ListAllDocuments() (d []Document, err error)\n```\n\n```go\nfunc (s *Session) ListAllImages() (i []Image, err error)\n```\n\n```go\nfunc (s *Session) ListAllNews() (n []News, err error)\n```\n\n```go\nfunc (s *Session) ListAllPlayers(token string) (p []Player, err error)\n```\n\n```go\nfunc (s *Session) ListAllPlayersByTeam(teamId uint64) (p []Player, err error)\n```\n\n```go\nfunc (s *Session) ListAllProgrammeSeasons() (p []ProgrammeSeason, err error)\n```\n\n```go\nfunc (s *Session) ListAllProgrammes() (p []Programme, err error)\n```\n\n```go\nfunc (s *Session) ListAllSponsors() (sp []Sponsor, err error)\n```\n\n```go\nfunc (s *Session) ListAllSponsorsByTeamId(teamId uint64) (sponsors []Sponsor, err error)\n```\n\n```go\nfunc (s *Session) ListAllSponsorsMinimal() (sp []Sponsor, err error)\n```\n\n```go\nfunc (s *Session) ListAllTeams(token string) (t []Team, err error)\n```\n\n```go\nfunc (s *Session) ListAllUsers(token string) (u []User, err error)\n```\n\n```go\nfunc (s *Session) ListAllWhatsOn() (w []WhatsOn, err error)\n```\n\n```go\nfunc (s *Session) ListAllWhatsOnEventFuture() (w []WhatsOn, err error)\n```\n\n```go\nfunc (s *Session) ListAllWhatsOnEventPast() (w []WhatsOn, err error)\n```\n\n```go\nfunc (s *Session) ListContactUsers() (u []User, err error)\n```\n\n```go\nfunc (s *Session) ListTeamManagersUsers(teamId uint64) (u []User, err error)\n```\n\n```go\ntype Sponsor struct {\n\tId       uint64 `json:\"id\"`\n\tName     string `json:\"name\"`\n\tWebsite  string `json:\"website\"`\n\tFileName string `json:\"file_name\"`\n\tPurpose  string `json:\"purpose\"`\n\tTeam     string `json:\"team\"`\n}\n```\n\n```go\ntype Team struct {\n\tId          uint64 `json:\"id\"`\n\tName        string `json:\"name\"`\n\tLeague      string `json:\"league,omitempty\"`\n\tDivision    string `json:\"division,omitempty\"`\n\tLeagueTable string `json:\"league_table,omitempty\"`\n\tFixtures    string `json:\"fixtures,omitempty\"`\n\tCoach       string `json:\"coach,omitempty\"`\n\tPhysio      string `json:\"physio,omitempty\"`\n\tFileName    string `json:\"file_name,omitempty\"`\n\tActive      bool   `json:\"active\"`\n\tYouth       bool   `json:\"youth\"`\n\tAges        int    `json:\"ages\"`\n}\n```\n\n```go\ntype User struct {\n\tId       uint64 `json:\"id\"`\n\tEmail    string `json:\"email\"`\n\tName     string `json:\"name\"`\n\tPhone    string `json:\"phone,omitempty\"`\n\tTeam     string `json:\"team,omitempty\"`\n\tRole     string `json:\"role\"`\n\tFileName string `json:\"file_name,omitempty\"`\n}\n```\nUser represents a user object to be used when not all data is required\n\n```go\ntype UserFull struct {\n\tUser\n\tPassword  string `json:\"password,omitempty\"`\n\tTemp      string `json:\"temp,omitempty\"`\n\tHash      []byte `json:\"hash,omitempty\"`\n\tSalt      []byte `json:\"salt,omitempty\"`\n\tLastLogin int64  `json:\"last_login,omitempty\"`\n\tCreatedAt int64  `json:\"created_at,omitempty\"`\n\tCreatedBy User   `json:\"created_by,omitempty\"`\n\tUpdatedAt int64  `json:\"updated_at,omitempty\"`\n\tUpdatedBy User   `json:\"updated_by,omitempty\"`\n\tDeletedAt int64  `json:\"deleted_at,omitempty\"`\n\tDeletedBy User   `json:\"deleted_by,omitempty\"`\n}\n```\nUserFull represents a user and all columns\n\n```go\ntype WhatsOn struct {\n\tId          uint64 `json:\"id\"`\n\tTitle       string `json:\"title\"`\n\tFileName    string `json:\"file_name,omitempty\"`\n\tContent     string `json:\"content\"`\n\tDate        int64  `json:\"date\"`\n\tDateOfEvent int64  `json:\"date_of_event\"`\n\tDelete      bool   `json:\"delete,omitempty\"`\n}\n```\n\n","path":"github.com/COMTOP1/api/handler","name":"handler","synopsis":"","isRedistributable":true}
