models

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {

	// i s b n
	ISBN string `json:"isbn,omitempty"`

	// author
	Author string `json:"author,omitempty"`

	// description
	Description string `json:"description,omitempty"`

	// title
	Title string `json:"title,omitempty"`
}

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 Error

type Error struct {

	// code
	// Required: true
	Code int64 `json:"code"`

	// message
	// Required: true
	Message string `json:"message"`
}

Error error

swagger:model Error

func (*Error) ContextValidate

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

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

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

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Error) Validate

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

Validate validates this error

type History

type History struct {

	// history
	History []Status `json:"history"`

	// isbn
	Isbn string `json:"isbn,omitempty"`
}

History history

swagger:model History

func (*History) ContextValidate

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

ContextValidate validate this history based on the context it is used

func (*History) MarshalBinary

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

MarshalBinary interface implementation

func (*History) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*History) Validate

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

Validate validates this history

type Status

type Status struct {

	// available
	Available uint64 `json:"available,omitempty"`

	// time
	// Format: date-time
	Time strfmt.DateTime `json:"time,omitempty"`

	// type
	Type StatusType `json:"type,omitempty"`

	// unavailable
	Unavailable uint64 `json:"unavailable,omitempty"`
}

Status status

swagger:model Status

func (*Status) ContextValidate

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

ContextValidate validate this status based on the context it is used

func (*Status) MarshalBinary

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

MarshalBinary interface implementation

func (*Status) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Status) Validate

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

Validate validates this status

type StatusType

type StatusType string

StatusType status type

swagger:model StatusType

const (

	// StatusTypeAcquired captures enum value "acquired"
	StatusTypeAcquired StatusType = "acquired"

	// StatusTypeCheckin captures enum value "checkin"
	StatusTypeCheckin StatusType = "checkin"

	// StatusTypeCheckout captures enum value "checkout"
	StatusTypeCheckout StatusType = "checkout"
)

func (StatusType) ContextValidate

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

ContextValidate validates this status type based on context it is used

func (StatusType) Validate

func (m StatusType) Validate(formats strfmt.Registry) error

Validate validates this status type

Jump to

Keyboard shortcuts

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