requests

package
v0.0.0-...-2fe0e47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorResponse

type ActorResponse struct {
	Name      string                  `json:"name"`
	Photo     string                  `json:"poster_href"`
	Career    []models.ProfessionItem `json:"career"`
	BirthDate string                  `json:"birthday"`
	Country   string                  `json:"country"`
	Info      string                  `json:"info_text"`
}

func (ActorResponse) MarshalEasyJSON

func (v ActorResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ActorResponse) MarshalJSON

func (v ActorResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ActorResponse) UnmarshalEasyJSON

func (v *ActorResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ActorResponse) UnmarshalJSON

func (v *ActorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ActorsResponse

type ActorsResponse struct {
	Actors []models.Character `json:"actors"`
	Total  uint64             `json:"total"`
}

func (ActorsResponse) MarshalEasyJSON

func (v ActorsResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ActorsResponse) MarshalJSON

func (v ActorsResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ActorsResponse) UnmarshalEasyJSON

func (v *ActorsResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ActorsResponse) UnmarshalJSON

func (v *ActorsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type AuthCheckResponse

type AuthCheckResponse struct {
	Login string `json:"login"`
	Role  string `json:"role"`
}

func (AuthCheckResponse) MarshalEasyJSON

func (v AuthCheckResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (AuthCheckResponse) MarshalJSON

func (v AuthCheckResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*AuthCheckResponse) UnmarshalEasyJSON

func (v *AuthCheckResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*AuthCheckResponse) UnmarshalJSON

func (v *AuthCheckResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CalendarResponse

type CalendarResponse struct {
	MonthName  string           `json:"monthName"`
	MonthText  string           `json:"monthText"`
	CurrentDay uint8            `json:"currentDay"`
	Days       []models.DayItem `json:"days"`
}

func (CalendarResponse) MarshalEasyJSON

func (v CalendarResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CalendarResponse) MarshalJSON

func (v CalendarResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CalendarResponse) UnmarshalEasyJSON

func (v *CalendarResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CalendarResponse) UnmarshalJSON

func (v *CalendarResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ChangeRoleRequest

type ChangeRoleRequest struct {
	Login string `json:"login"`
	Role  string `json:"role"`
}

func (ChangeRoleRequest) MarshalEasyJSON

func (v ChangeRoleRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ChangeRoleRequest) MarshalJSON

func (v ChangeRoleRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ChangeRoleRequest) UnmarshalEasyJSON

func (v *ChangeRoleRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ChangeRoleRequest) UnmarshalJSON

func (v *ChangeRoleRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

func GetCollector

func GetCollector() *Collector

func (*Collector) SendResponse

func (c *Collector) SendResponse(w http.ResponseWriter, r *http.Request, response Response, lg *slog.Logger, start time.Time)

type CommentRequest

type CommentRequest struct {
	FilmId uint64 `json:"film_id"`
	Rating uint16 `json:"rating"`
	Text   string `json:"text"`
}

func (CommentRequest) MarshalEasyJSON

func (v CommentRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CommentRequest) MarshalJSON

func (v CommentRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CommentRequest) UnmarshalEasyJSON

func (v *CommentRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CommentRequest) UnmarshalJSON

func (v *CommentRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CommentResponse

type CommentResponse struct {
	Comments []models.CommentItem `json:"comment"`
}

func (CommentResponse) MarshalEasyJSON

func (v CommentResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CommentResponse) MarshalJSON

func (v CommentResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CommentResponse) UnmarshalEasyJSON

func (v *CommentResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CommentResponse) UnmarshalJSON

func (v *CommentResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DeleteCommentRequest

type DeleteCommentRequest struct {
	IdUser uint64 `json:"user_id"`
	IdFilm uint64 `json:"film_id"`
}

func (DeleteCommentRequest) MarshalEasyJSON

func (v DeleteCommentRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DeleteCommentRequest) MarshalJSON

func (v DeleteCommentRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DeleteCommentRequest) UnmarshalEasyJSON

func (v *DeleteCommentRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DeleteCommentRequest) UnmarshalJSON

func (v *DeleteCommentRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EditProfileRequest

type EditProfileRequest struct {
	Login    string `json:"login"`
	Email    string `json:"email"`
	Photo    []byte `json:"photo"`
	Password string `json:"password"`
}

func (EditProfileRequest) MarshalEasyJSON

func (v EditProfileRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EditProfileRequest) MarshalJSON

func (v EditProfileRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EditProfileRequest) UnmarshalEasyJSON

func (v *EditProfileRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EditProfileRequest) UnmarshalJSON

func (v *EditProfileRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FilmResponse

type FilmResponse struct {
	Film       models.FilmItem    `json:"film"`
	Genres     []models.GenreItem `json:"genre"`
	Rating     float64            `json:"rating"`
	Number     uint64             `json:"number"`
	Directors  []models.CrewItem  `json:"directors"`
	Scenarists []models.CrewItem  `json:"scenarists"`
	Characters []models.Character `json:"actors"`
}

func (FilmResponse) MarshalEasyJSON

func (v FilmResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FilmResponse) MarshalJSON

func (v FilmResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FilmResponse) UnmarshalEasyJSON

func (v *FilmResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FilmResponse) UnmarshalJSON

func (v *FilmResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FilmsResponse

type FilmsResponse struct {
	Page           uint64            `json:"current_page"`
	PageSize       uint64            `json:"page_size"`
	CollectionName string            `json:"collection_name"`
	Total          uint64            `json:"total"`
	Films          []models.FilmItem `json:"films"`
}

func (FilmsResponse) MarshalEasyJSON

func (v FilmsResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FilmsResponse) MarshalJSON

func (v FilmsResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FilmsResponse) UnmarshalEasyJSON

func (v *FilmsResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FilmsResponse) UnmarshalJSON

func (v *FilmsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FindActorRequest

type FindActorRequest struct {
	Name      string   `json:"name"`
	BirthDate string   `json:"birthday"`
	Career    []string `json:"amplua"`
	Films     []string `json:"films"`
	Country   string   `json:"country"`
	Page      uint64   `json:"page"`
	PerPage   uint64   `json:"per_page"`
}

func (FindActorRequest) MarshalEasyJSON

func (v FindActorRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FindActorRequest) MarshalJSON

func (v FindActorRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FindActorRequest) UnmarshalEasyJSON

func (v *FindActorRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FindActorRequest) UnmarshalJSON

func (v *FindActorRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FindFilmRequest

type FindFilmRequest struct {
	Title      string   `json:"title"`
	DateFrom   string   `json:"date_from"`
	DateTo     string   `json:"date_to"`
	RatingFrom float32  `json:"rating_from"`
	RatingTo   float32  `json:"rating_to"`
	Mpaa       string   `json:"mpaa"`
	Genres     []uint32 `json:"genres"`
	Actors     []string `json:"actors"`
	Page       uint64   `json:"page"`
	PerPage    uint64   `json:"per_page"`
}

func (FindFilmRequest) MarshalEasyJSON

func (v FindFilmRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FindFilmRequest) MarshalJSON

func (v FindFilmRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FindFilmRequest) UnmarshalEasyJSON

func (v *FindFilmRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FindFilmRequest) UnmarshalJSON

func (v *FindFilmRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ProfileResponse

type ProfileResponse struct {
	Email     string `json:"email"`
	Name      string `json:"name"`
	Login     string `json:"login"`
	Photo     string `json:"photo"`
	BirthDate string `json:"birthday"`
}

func (ProfileResponse) MarshalEasyJSON

func (v ProfileResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ProfileResponse) MarshalJSON

func (v ProfileResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ProfileResponse) UnmarshalEasyJSON

func (v *ProfileResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ProfileResponse) UnmarshalJSON

func (v *ProfileResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Response

type Response struct {
	Status int `json:"status"`
	Body   any `json:"body"`
}

func (Response) MarshalEasyJSON

func (v Response) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Response) MarshalJSON

func (v Response) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Response) UnmarshalEasyJSON

func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Response) UnmarshalJSON

func (v *Response) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SigninRequest

type SigninRequest struct {
	Login    string `json:"login"`
	Password string `json:"password"`
}

func (SigninRequest) MarshalEasyJSON

func (v SigninRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SigninRequest) MarshalJSON

func (v SigninRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SigninRequest) UnmarshalEasyJSON

func (v *SigninRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SigninRequest) UnmarshalJSON

func (v *SigninRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SignupRequest

type SignupRequest struct {
	Login     string `json:"login"`
	Email     string `json:"email"`
	Password  string `json:"password"`
	BirthDate string `json:"birth_date"`
	Name      string `json:"name"`
}

func (SignupRequest) MarshalEasyJSON

func (v SignupRequest) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SignupRequest) MarshalJSON

func (v SignupRequest) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SignupRequest) UnmarshalEasyJSON

func (v *SignupRequest) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SignupRequest) UnmarshalJSON

func (v *SignupRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SubcribeResponse

type SubcribeResponse struct {
	IsSubcribed bool `json:"subscribe"`
}

func (SubcribeResponse) MarshalEasyJSON

func (v SubcribeResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SubcribeResponse) MarshalJSON

func (v SubcribeResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SubcribeResponse) UnmarshalEasyJSON

func (v *SubcribeResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SubcribeResponse) UnmarshalJSON

func (v *SubcribeResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type UsersResponse

type UsersResponse struct {
	Users []models.UserItem `json:"users"`
}

func (UsersResponse) MarshalEasyJSON

func (v UsersResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (UsersResponse) MarshalJSON

func (v UsersResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*UsersResponse) UnmarshalEasyJSON

func (v *UsersResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*UsersResponse) UnmarshalJSON

func (v *UsersResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type UsersStatisticsResponse

type UsersStatisticsResponse struct {
	GenreId uint64  `json:"genre_id"`
	Count   uint64  `json:"count"`
	Avg     float64 `json:"avg"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL