org

package
v0.14.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package org provides the ability for inserting Vela org resources into or extracting Vela org resources from the middleware chain for the API.

Usage:

import "github.com/go-vela/server/router/middleware/org"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Establish

func Establish() gin.HandlerFunc

Establish used to check if org param is used only.

func FromContext

func FromContext(c context.Context) string

FromContext returns the Org associated with this context.

func Retrieve

func Retrieve(c *gin.Context) string

Retrieve gets the org in the given context.

func ToContext

func ToContext(c Setter, o string)

ToContext adds the Org to this context if it supports the Setter interface.

Types

type Setter

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

Jump to

Keyboard shortcuts

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