gcloudwebhook

package module
v0.0.0-...-0a3e708 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

privx-go-webhook

PrivX Go Webhook

Documentation

Index

Constants

View Source
const (
	// Realm specifies the HTTP authentication realm.
	Realm = "Jira PrivX Webhook"
	// Tenant specifies the OAuth2 authentication tenant.
	Tenant = "Jira-PrivX-Webhook"
	// InstanceEnvVar specifies the environment variable that holds
	// the PrivX instance name.
	InstanceEnvVar = "PRIVX_INSTANCE"
)
View Source
const (
	// Role is PrivX user role to assign.
	Role = "ssh-user"
)

Variables

This section is empty.

Functions

func AddPrivXInstance

func AddPrivXInstance(name string, config, userMappings []byte) error

AddPrivXInstance adds the named PrivX instance to the PrivX collection in Firestore. TODO, must change to use correct types instead of []byte configs.

func Errorf

func Errorf(w http.ResponseWriter, code int, format string, a ...interface{})

Errorf formats an HTTP error response.

func PrivXWebhook

func PrivXWebhook(w http.ResponseWriter, r *http.Request)

PrivXWebhook is the cloud function entry point for Jira-PrivX integration.

Types

type Instance

type Instance struct {
	Name         string
	Config       *config.Config
	UserMappings map[string]string
}

Instance contains configuration information for a PrivX instance.

func GetPrivXInstance

func GetPrivXInstance(name string) ([]*Instance, error)

GetPrivXInstance gets the PrivX instance by name.

func GetPrivXInstances

func GetPrivXInstances() ([]*Instance, error)

GetPrivXInstances returns all known PrivX instances.

Directories

Path Synopsis
apps
cmd command
privx command

Jump to

Keyboard shortcuts

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