service

package
v0.0.0-...-d5e74d8 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(config *Config) *http.Server

NewServer creates a new server stride:generate new-server

Types

type Account

type Account struct {
	// stride:generate id
	ID int64 `json:"id,omitempty" xml:"id,omitempty" form:"id,omitempty" field:"id,omitempty" validate:"-"`
	// stride:generate date-of-birth
	DateOfBirth time.Time `` /* 136-byte string literal not displayed */
	// stride:generate email
	Email string `json:"email" xml:"email" form:"email" field:"email" validate:"required,gt=0"`
	// stride:generate first-name
	FirstName string `` /* 128-byte string literal not displayed */
	// stride:generate last-name
	LastName string `json:"last_name,omitempty" xml:"last_name,omitempty" form:"last_name,omitempty" field:"last_name,omitempty" validate:"gte=0"`
}

Account is a type auto-generated from OpenAPI spec stride:generate account

type AccountAPI

type AccountAPI struct {
}

AccountAPI is a type auto-generated from OpenAPI spec stride:generate account-api

func (*AccountAPI) CreateAccount

func (x *AccountAPI) CreateAccount(w http.ResponseWriter, r *http.Request)

CreateAccount handles endpoint POST /accounts Create an account stride:generate account-api:create-account

func (*AccountAPI) DeleteAccountByID

func (x *AccountAPI) DeleteAccountByID(w http.ResponseWriter, r *http.Request)

DeleteAccountByID handles endpoint DELETE /accounts/{account_id} Delete an account by id stride:generate account-api:delete-account-by-id

func (*AccountAPI) GetAccountByID

func (x *AccountAPI) GetAccountByID(w http.ResponseWriter, r *http.Request)

GetAccountByID handles endpoint GET /accounts/{account_id} Fetch an account by id stride:generate account-api:get-account-by-id

func (*AccountAPI) GetAllAccounts

func (x *AccountAPI) GetAllAccounts(w http.ResponseWriter, r *http.Request)

GetAllAccounts handles endpoint GET /accounts List all accounts stride:generate account-api:get-all-accounts

func (*AccountAPI) Mount

func (x *AccountAPI) Mount(r chi.Router)

Mount mounts the controller to the router stride:generate account-api:mount

type Accounts

type Accounts []*Account

Accounts is a type auto-generated from OpenAPI spec stride:generate accounts

type Config

type Config struct {
	// stride:generate addr
	Addr string
}

Config is the service config stride:generate config

type CreateAccountCreatedOutput

type CreateAccountCreatedOutput struct {
}

CreateAccountCreatedOutput is a type auto-generated from OpenAPI spec It is the output of CreateAccount operation with code: 201 stride:generate create-account-created-output

func (*CreateAccountCreatedOutput) Status

func (x *CreateAccountCreatedOutput) Status() int

Status returns an http status code stride:generate create-account-created-output:status

type CreateAccountInput

type CreateAccountInput struct {
}

CreateAccountInput is a type auto-generated from OpenAPI spec It is the input of CreateAccount operation stride:generate create-account-input

type CreateAccountInternalServerErrorOutput

type CreateAccountInternalServerErrorOutput struct {
	// stride:generate body
	Body *Error `body:"~"`
}

CreateAccountInternalServerErrorOutput is a type auto-generated from OpenAPI spec It is the output of CreateAccount operation with code: 500 stride:generate create-account-internal-server-error-output

func (CreateAccountInternalServerErrorOutput) MarshalJSON

func (x CreateAccountInternalServerErrorOutput) MarshalJSON() ([]byte, error)

MarshalJSON marshals into valid JSON stride:generate create-account-internal-server-error-output:marshal-j-s-o-n

func (CreateAccountInternalServerErrorOutput) MarshalXML

MarshalXML marshals into valid XML stride:generate create-account-internal-server-error-output:marshal-x-m-l

func (*CreateAccountInternalServerErrorOutput) Status

Status returns an http status code stride:generate create-account-internal-server-error-output:status

type CreateAccountOutput

type CreateAccountOutput CreateAccountCreatedOutput

CreateAccountOutput is a type auto-generated from OpenAPI spec It is the alias to the default output of CreateAccount operation stride:generate create-account-output

type DeleteAccountByIDInput

type DeleteAccountByIDInput struct {
	// stride:generate path
	Path *DeleteAccountByIDInputPath `path:"~"`
}

DeleteAccountByIDInput is a type auto-generated from OpenAPI spec It is the input of DeleteAccountByID operation stride:generate delete-account-by-id-input

type DeleteAccountByIDInputPath

type DeleteAccountByIDInputPath struct {
	// stride:generate account-id
	AccountID string `path:"account_id,simple" validate:"required,gt=0"`
}

DeleteAccountByIDInputPath is a type auto-generated from OpenAPI spec It is the path of DeleteAccountByIDInput stride:generate delete-account-by-id-input-path

type DeleteAccountByIDInternalServerErrorOutput

type DeleteAccountByIDInternalServerErrorOutput struct {
	// stride:generate body
	Body *Error `body:"~"`
}

DeleteAccountByIDInternalServerErrorOutput is a type auto-generated from OpenAPI spec It is the output of DeleteAccountByID operation with code: 500 stride:generate delete-account-by-id-internal-server-error-output

func (DeleteAccountByIDInternalServerErrorOutput) MarshalJSON

MarshalJSON marshals into valid JSON stride:generate delete-account-by-id-internal-server-error-output:marshal-j-s-o-n

func (DeleteAccountByIDInternalServerErrorOutput) MarshalXML

MarshalXML marshals into valid XML stride:generate delete-account-by-id-internal-server-error-output:marshal-x-m-l

func (*DeleteAccountByIDInternalServerErrorOutput) Status

Status returns an http status code stride:generate delete-account-by-id-internal-server-error-output:status

type DeleteAccountByIDOKOutput

type DeleteAccountByIDOKOutput struct {
}

DeleteAccountByIDOKOutput is a type auto-generated from OpenAPI spec It is the output of DeleteAccountByID operation with code: 200 stride:generate delete-account-by-id-ok-output

func (*DeleteAccountByIDOKOutput) Status

func (x *DeleteAccountByIDOKOutput) Status() int

Status returns an http status code stride:generate delete-account-by-id-ok-output:status

type DeleteAccountByIDOutput

type DeleteAccountByIDOutput DeleteAccountByIDOKOutput

DeleteAccountByIDOutput is a type auto-generated from OpenAPI spec It is the alias to the default output of DeleteAccountByID operation stride:generate delete-account-by-id-output

type Error

type Error struct {
	// stride:generate code
	Code int32 `json:"code" xml:"code" form:"code" field:"code" validate:"required"`
	// stride:generate message
	Message string `json:"message" xml:"message" form:"message" field:"message" validate:"required,gt=0"`
}

Error is a type auto-generated from OpenAPI spec stride:generate error

type GetAccountByIDInput

type GetAccountByIDInput struct {
	// stride:generate path
	Path *GetAccountByIDInputPath `path:"~"`
}

GetAccountByIDInput is a type auto-generated from OpenAPI spec It is the input of GetAccountByID operation stride:generate get-account-by-id-input

type GetAccountByIDInputPath

type GetAccountByIDInputPath struct {
	// stride:generate account-id
	AccountID string `path:"account_id,simple" validate:"required,gt=0"`
}

GetAccountByIDInputPath is a type auto-generated from OpenAPI spec It is the path of GetAccountByIDInput stride:generate get-account-by-id-input-path

type GetAccountByIDInternalServerErrorOutput

type GetAccountByIDInternalServerErrorOutput struct {
	// stride:generate body
	Body *Error `body:"~"`
}

GetAccountByIDInternalServerErrorOutput is a type auto-generated from OpenAPI spec It is the output of GetAccountByID operation with code: 500 stride:generate get-account-by-id-internal-server-error-output

func (GetAccountByIDInternalServerErrorOutput) MarshalJSON

func (x GetAccountByIDInternalServerErrorOutput) MarshalJSON() ([]byte, error)

MarshalJSON marshals into valid JSON stride:generate get-account-by-id-internal-server-error-output:marshal-j-s-o-n

func (GetAccountByIDInternalServerErrorOutput) MarshalXML

MarshalXML marshals into valid XML stride:generate get-account-by-id-internal-server-error-output:marshal-x-m-l

func (*GetAccountByIDInternalServerErrorOutput) Status

Status returns an http status code stride:generate get-account-by-id-internal-server-error-output:status

type GetAccountByIDNotFoundOutput

type GetAccountByIDNotFoundOutput struct {
	// stride:generate body
	Body *Error `body:"~"`
}

GetAccountByIDNotFoundOutput is a type auto-generated from OpenAPI spec It is the output of GetAccountByID operation with code: 404 stride:generate get-account-by-id-not-found-output

func (GetAccountByIDNotFoundOutput) MarshalJSON

func (x GetAccountByIDNotFoundOutput) MarshalJSON() ([]byte, error)

MarshalJSON marshals into valid JSON stride:generate get-account-by-id-not-found-output:marshal-j-s-o-n

func (GetAccountByIDNotFoundOutput) MarshalXML

MarshalXML marshals into valid XML stride:generate get-account-by-id-not-found-output:marshal-x-m-l

func (*GetAccountByIDNotFoundOutput) Status

func (x *GetAccountByIDNotFoundOutput) Status() int

Status returns an http status code stride:generate get-account-by-id-not-found-output:status

type GetAllAccountsInput

type GetAllAccountsInput struct {
	// stride:generate query
	Query *GetAllAccountsInputQuery `query:"~"`
}

GetAllAccountsInput is a type auto-generated from OpenAPI spec It is the input of GetAllAccounts operation stride:generate get-all-accounts-input

type GetAllAccountsInputQuery

type GetAllAccountsInputQuery struct {
	// stride:generate limit
	Limit int32 `query:"limit,form,explode" validate:"-"`
}

GetAllAccountsInputQuery is a type auto-generated from OpenAPI spec It is the query of GetAllAccountsInput stride:generate get-all-accounts-input-query

type GetAllAccountsInternalServerErrorOutput

type GetAllAccountsInternalServerErrorOutput struct {
	// stride:generate body
	Body *Error `body:"~"`
}

GetAllAccountsInternalServerErrorOutput is a type auto-generated from OpenAPI spec It is the output of GetAllAccounts operation with code: 500 stride:generate get-all-accounts-internal-server-error-output

func (GetAllAccountsInternalServerErrorOutput) MarshalJSON

func (x GetAllAccountsInternalServerErrorOutput) MarshalJSON() ([]byte, error)

MarshalJSON marshals into valid JSON stride:generate get-all-accounts-internal-server-error-output:marshal-j-s-o-n

func (GetAllAccountsInternalServerErrorOutput) MarshalXML

MarshalXML marshals into valid XML stride:generate get-all-accounts-internal-server-error-output:marshal-x-m-l

func (*GetAllAccountsInternalServerErrorOutput) Status

Status returns an http status code stride:generate get-all-accounts-internal-server-error-output:status

type GetAllAccountsOKOutput

type GetAllAccountsOKOutput struct {
	// stride:generate body
	Body *Account `body:"~"`
}

GetAllAccountsOKOutput is a type auto-generated from OpenAPI spec It is the output of GetAllAccounts operation with code: 200 stride:generate get-all-accounts-ok-output

func (GetAllAccountsOKOutput) MarshalJSON

func (x GetAllAccountsOKOutput) MarshalJSON() ([]byte, error)

MarshalJSON marshals into valid JSON stride:generate get-all-accounts-ok-output:marshal-j-s-o-n

func (GetAllAccountsOKOutput) MarshalXML

func (x GetAllAccountsOKOutput) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML marshals into valid XML stride:generate get-all-accounts-ok-output:marshal-x-m-l

func (*GetAllAccountsOKOutput) Status

func (x *GetAllAccountsOKOutput) Status() int

Status returns an http status code stride:generate get-all-accounts-ok-output:status

type GetAllAccountsOutput

type GetAllAccountsOutput GetAllAccountsOKOutput

GetAllAccountsOutput is a type auto-generated from OpenAPI spec It is the alias to the default output of GetAllAccounts operation stride:generate get-all-accounts-output

type Route

type Route interface {
	Mount(r chi.Router)
}

Route represents a mountable route stride:generate route

Jump to

Keyboard shortcuts

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