server

package
v0.0.0-...-7382598 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package server contains implementation of REST API server (HTTPServer) for the Insights report server. In current version, the following REST API endpoints are available:

Index

Constants

View Source
const (
	// ContextKeyUser is a constant for user authentication token in request
	ContextKeyUser = contextKey("user")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Address     string `mapstructure:"address" toml:"address"`
	APIPrefix   string `mapstructure:"api_prefix" toml:"api_prefix"`
	APISpecFile string `mapstructure:"api_spec_file" toml:"api_spec_file"`
}

Configuration represents configuration of REST API HTTP server

type Identity

type Identity struct {
	AccountNumber types.UserID `json:"account_number"`
	Internal      Internal     `json:"internal"`
}

Identity contains internal user info

type Internal

type Internal struct {
	OrgID types.OrgID `json:"org_id,string"`
}

Internal contains information about organization ID

type JWTPayload

type JWTPayload struct {
	AccountNumber types.UserID `json:"account_number"`
	OrgID         types.OrgID  `json:"org_id,string"`
}

JWTPayload is structure that contain data from parsed JWT token

type Token

type Token struct {
	Identity Identity `json:"identity"`
}

Token is x-rh-identity struct

Jump to

Keyboard shortcuts

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