Documentation ¶
Index ¶
- Variables
- func Auth() gin.HandlerFunc
- func CreateAttribute(c *gin.Context)
- func CreateEntity(c *gin.Context)
- func DeleteAttribute(c *gin.Context)
- func GetAttribute(c *gin.Context)
- func GetAttributesByEntity(c *gin.Context)
- func GetEntities(c *gin.Context)
- func GetEntity(c *gin.Context)
- func Index(c *gin.Context)
- func NewRouter() *gin.Engine
- func UpdateAttribute(c *gin.Context)
- func UpdateEntity(c *gin.Context)
- type Header
- type Route
- type Routes
Constants ¶
This section is empty.
Variables ¶
View Source
var Attribute = controller.NewAttribute(logger.GetLogger())
View Source
var Controller = controller.New(logger.GetLogger())
View Source
var Entity = controller.NewEntity(logger.GetLogger())
Functions ¶
func Auth ¶
func Auth() gin.HandlerFunc
Auth - 認証(認可)を行うミドルウェア。 headerをバリデーションし、アクセスキーの検証を行う。 検証に成功した場合、Contextにアクセスキー検証状態を保持。 検証に失敗した場合、処理を中断し、Unauthorized Statusでレスポンスする。 TODO 具体的な処理の定義をControllerに移譲する
func GetAttributesByEntity ¶
GetAttributesByEntity - Your GET endpoint
Types ¶
type Route ¶
type Route struct { // Name is the name of this Route. Name string // Method is the string for the HTTP method. ex) GET, POST etc.. Method string // Pattern is the pattern of the URI. Pattern string // HandlerFunc is the handler function of this route. HandlerFunc gin.HandlerFunc }
Route is the information for every URI.
Click to show internal directories.
Click to hide internal directories.