go-swagger: github.com/go-swagger/go-swagger/examples/composed-auth/models Index | Files

package models

import "github.com/go-swagger/go-swagger/examples/composed-auth/models"

Index

Package Files

error.go item.go order.go principal.go

type Error Uses

type Error struct {

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

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

Error error

swagger:model Error

func (*Error) ContextValidate Uses

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

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary Uses

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

MarshalBinary interface implementation

func (*Error) UnmarshalBinary Uses

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

UnmarshalBinary interface implementation

func (*Error) Validate Uses

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

Validate validates this error

type Item Uses

type Item string

Item item

swagger:model Item

func (Item) ContextValidate Uses

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

ContextValidate validates this item based on context it is used

func (Item) Validate Uses

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

Validate validates this item

type Order Uses

type Order struct {

    // order ID
    // Required: true
    OrderID *string `json:"orderID"`

    // order lines
    OrderLines []*OrderLine `json:"orderLines"`
}

Order order

swagger:model Order

func (*Order) ContextValidate Uses

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

ContextValidate validate this order based on the context it is used

func (*Order) MarshalBinary Uses

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

MarshalBinary interface implementation

func (*Order) UnmarshalBinary Uses

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

UnmarshalBinary interface implementation

func (*Order) Validate Uses

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

Validate validates this order

type OrderLine Uses

type OrderLine struct {

    // purchased item
    // Required: true
    PurchasedItem *Item `json:"purchasedItem"`

    // quantity
    // Required: true
    // Minimum: 1
    Quantity *int32 `json:"quantity"`
}

OrderLine order line

swagger:model orderLine

func (*OrderLine) ContextValidate Uses

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

ContextValidate validate this order line based on the context it is used

func (*OrderLine) MarshalBinary Uses

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

MarshalBinary interface implementation

func (*OrderLine) UnmarshalBinary Uses

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

UnmarshalBinary interface implementation

func (*OrderLine) Validate Uses

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

Validate validates this order line

type Principal Uses

type Principal struct {

    // name
    Name string `json:"name,omitempty"`

    // roles
    Roles []string `json:"roles"`
}

Principal principal

swagger:model principal

func (*Principal) ContextValidate Uses

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

ContextValidate validates this principal based on context it is used

func (*Principal) MarshalBinary Uses

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

MarshalBinary interface implementation

func (*Principal) UnmarshalBinary Uses

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

UnmarshalBinary interface implementation

func (*Principal) Validate Uses

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

Validate validates this principal

Package models imports 6 packages (graph) and is imported by 3 packages. Updated 2021-01-25. Refresh now. Tools for package owners.