http

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Controller = controller.New(logger.GetLogger())

Functions

func Auth

func Auth() gin.HandlerFunc

Auth - 認証(認可)を行うミドルウェア。 headerをバリデーションし、アクセスキーの検証を行う。 検証に成功した場合、Contextにアクセスキー検証状態を保持。 検証に失敗した場合、処理を中断し、Unauthorized Statusでレスポンスする。 TODO 具体的な処理の定義をControllerに移譲する

func CreateAttribute

func CreateAttribute(c *gin.Context)

CreateAttribute -

func CreateEntity

func CreateEntity(c *gin.Context)

CreateEntity -

func DeleteAttribute

func DeleteAttribute(c *gin.Context)

DeleteAttribute -

func GetAttribute

func GetAttribute(c *gin.Context)

GetAttribute -

func GetAttributesByEntity

func GetAttributesByEntity(c *gin.Context)

GetAttributesByEntity - Your GET endpoint

func GetEntities

func GetEntities(c *gin.Context)

GetEntities - Your GET endpoint

func GetEntity

func GetEntity(c *gin.Context)

GetEntity - Your GET endpoint

func Index

func Index(c *gin.Context)

Index is the index handler.

func NewRouter

func NewRouter() *gin.Engine

//UseSentryLocalHub

func UseSentryLocalHub (ctx *gin.Context, tagKey string,tagValue string) {
 if hub := sentrygin.GetHubFromContext(ctx); hub != nil {
		hub.WithScope(func(scope *sentry.Scope) {
			scope.SetTag(tagKey, tagValue)
		})
	}
}

NewRouter returns a new router.

func UpdateAttribute

func UpdateAttribute(c *gin.Context)

UpdateAttribute -

func UpdateEntity

func UpdateEntity(c *gin.Context)

UpdateEntity -

Types

type Header struct {
	// contains filtered or unexported fields
}

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.

type Routes

type Routes []Route

Routes is the list of the generated Route.

Jump to

Keyboard shortcuts

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