at

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package at provides annotations for struct

Package at provides annotations for web RestController

Copyright 2018~now John Deng (hi.devops.io@gmail.com).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyMapping added in v1.2.0

type AnyMapping struct {
	Method string `value:"ANY"`
}

AnyMapping is the annotation that set the AnyMapping of a controller

type AutoConfiguration added in v0.9.7

type AutoConfiguration interface{}

AutoConfiguration is the annotation of auto configuration

type Component added in v0.11.0

type Component interface{}

Component is the annotation that the dependency is injected in app init.

type ConfigurationProperties added in v0.9.8

type ConfigurationProperties interface{}

ConfigurationProperties is the annotation that annotate configuration properties

type ContextAware added in v0.11.0

type ContextAware interface{}

ContextAware is the annotation that it is the ability of a component to be injected when method of Rest Controller is requested.

type Example struct {
  at.ContextAware
  ...
}

type ContextPath added in v0.11.0

type ContextPath interface{}

ContextPath is the annotation that set the context path of a controller

type DeleteMapping added in v1.2.0

type DeleteMapping struct {
	Method `value:"DELETE"`
}

DeleteMapping is the annotation that set the DeleteMapping of a controller

type GetMapping added in v1.2.0

type GetMapping struct {
	Method `value:"GET"`
}

GetMapping is the annotation that set the GetMapping of a controller

type HealthCheckService added in v0.10.2

type HealthCheckService interface {
}

HealthCheckService is the annotation for health check service

type IntAnnotation added in v1.2.0

type IntAnnotation interface {
	Int() (value int)
	Value(value int) IntAnnotation
}

IntAnnotation is the string annotation

type JwtRestController added in v0.11.0

type JwtRestController interface{}

JwtRestController is the annotation that declare current controller is the RESTful Controller with JWT support

type ListOptions added in v1.2.0

type ListOptions struct {
	// For paginated result sets, page of results to retrieve.
	Page int `url:"page,omitempty" json:"page,omitempty"`

	// For paginated result sets, the number of results to include per page.
	PerPage int `url:"per_page,omitempty" json:"per_page,omitempty"`
}

ListOptions specifies the optional parameters to various List methods that support pagination.

type Method added in v1.2.0

type Method string

Method is the annotation that set the RequestMethod of a controller

func (Method) String added in v1.2.0

func (a Method) String() (value string)

String returns the value of the type RequestMethod

func (Method) Value added in v1.2.0

func (a Method) Value(str string) (value StringAnnotation)

Value set the value of the type RequestMethod

type OptionsMapping added in v1.2.0

type OptionsMapping struct {
	Method string `value:"OPTIONS"`
}

OptionsMapping is the annotation that set the OptionsMapping of a controller

type Path added in v1.2.0

type Path string

Path is the annotation that set the Path of a controller

func (Path) String added in v1.2.0

func (a Path) String() (value string)

String returns the value of the type Path in string

func (Path) Value added in v1.2.0

func (a Path) Value(str string) (value StringAnnotation)

Value set the value of the type RequestPath

type PostMapping added in v1.2.0

type PostMapping struct {
	Method `value:"POST"`
}

PostMapping is the annotation that set the PostMapping of a controller

type PutMapping added in v1.2.0

type PutMapping struct {
	Method `value:"PUT"`
}

PutMapping is the annotation that set the PutMapping of a controller

type Qualifier

type Qualifier interface {
}

Qualifier is the annotation that used for disambiguate the references.

type RequestBody added in v0.11.0

type RequestBody interface{}

RequestBody the annotation RequestBody

type RequestForm added in v0.11.0

type RequestForm struct{}

RequestForm the annotation RequestForm TODO: should investigate why interface is not working on this annotation TODO: see uint test "should return http.StatusInternalServerError when input form field validation failed"

type RequestMapping added in v1.2.0

type RequestMapping string

RequestMapping is the annotation that set the RequestMapping of a controller

func (RequestMapping) String added in v1.2.0

func (a RequestMapping) String() (value string)

StringValue returns the value of the type RequestMapping

func (RequestMapping) Value added in v1.2.0

func (a RequestMapping) Value(str string) (value StringAnnotation)

// Value set and return the value of the type RequestMapping

type RequestParams added in v0.11.0

type RequestParams interface{}

RequestParams the annotation RequestParams

type ResponseBody added in v0.11.0

type ResponseBody interface{}

ResponseBody the annotation ResponseBody

type ResponseData added in v0.11.0

type ResponseData interface{}

ResponseData the annotation ResponseData

type RestController added in v0.9.7

type RestController interface{}

RestController is the annotation that declare current controller is the RESTful Controller

type StringAnnotation added in v1.2.0

type StringAnnotation interface {
	Value(value string) StringAnnotation
	String() (value string)
}

StringAnnotation is the string annotation

type Tag added in v1.2.0

type Tag string

Tag the annotation Tag, tell the injector that the struct implements a tag

Jump to

Keyboard shortcuts

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