models

package
v0.0.0-...-f43f97b Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {

	// code
	Code int64 `json:"code,omitempty"`

	// a (key, value) map.
	Details interface{} `json:"details,omitempty"`

	// message
	Message string `json:"message,omitempty"`
}

APIResponse Api response

swagger:model ApiResponse

func (*APIResponse) ContextValidate

func (m *APIResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this Api response based on context it is used

func (*APIResponse) MarshalBinary

func (m *APIResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*APIResponse) UnmarshalBinary

func (m *APIResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*APIResponse) Validate

func (m *APIResponse) Validate(formats strfmt.Registry) error

Validate validates this Api response

type Author

type Author struct {

	// books
	Books []*Book `json:"books"`

	// id
	ID int64 `json:"id,omitempty"`

	// name
	// Required: true
	Name *string `json:"name"`
}

Author author

swagger:model Author

func (*Author) ContextValidate

func (m *Author) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this author based on the context it is used

func (*Author) MarshalBinary

func (m *Author) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Author) UnmarshalBinary

func (m *Author) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Author) Validate

func (m *Author) Validate(formats strfmt.Registry) error

Validate validates this author

type Book

type Book struct {

	// author ID
	AuthorID int64 `json:"authorID,omitempty"`

	// genre
	// Required: true
	Genre *string `json:"genre"`

	// id
	ID int64 `json:"id,omitempty"`

	// isbn
	// Required: true
	Isbn *string `json:"isbn"`

	// name
	// Required: true
	Name *string `json:"name"`

	// page number
	// Required: true
	PageNumber *int64 `json:"pageNumber"`

	// release date
	// Required: true
	// Format: date
	ReleaseDate *strfmt.Date `json:"releaseDate"`
}

Book book

swagger:model Book

func (*Book) ContextValidate

func (m *Book) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this book based on context it is used

func (*Book) MarshalBinary

func (m *Book) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Book) UnmarshalBinary

func (m *Book) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Book) Validate

func (m *Book) Validate(formats strfmt.Registry) error

Validate validates this book

type Login

type Login struct {

	// email
	// Required: true
	Email *string `json:"email"`

	// password
	// Required: true
	Password *string `json:"password"`
}

Login login

swagger:model Login

func (*Login) ContextValidate

func (m *Login) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this login based on context it is used

func (*Login) MarshalBinary

func (m *Login) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Login) UnmarshalBinary

func (m *Login) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Login) Validate

func (m *Login) Validate(formats strfmt.Registry) error

Validate validates this login

type User

type User struct {

	// email
	Email string `json:"email,omitempty"`

	// first name
	FirstName string `json:"firstName,omitempty"`

	// id
	ID int64 `json:"id,omitempty"`

	// is admin
	IsAdmin bool `json:"isAdmin,omitempty"`

	// last name
	LastName string `json:"lastName,omitempty"`

	// password
	Password string `json:"password,omitempty"`

	// phone
	Phone string `json:"phone,omitempty"`

	// username
	Username string `json:"username,omitempty"`
}

User user

swagger:model User

func (*User) ContextValidate

func (m *User) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this user based on context it is used

func (*User) MarshalBinary

func (m *User) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*User) UnmarshalBinary

func (m *User) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*User) Validate

func (m *User) Validate(formats strfmt.Registry) error

Validate validates this user

Jump to

Keyboard shortcuts

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