hooks

package
v0.0.0-...-5961fbe Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PreCreateInnkeeperHook

func PreCreateInnkeeperHook(c *gin.Context) ([]byte, error)

PreCreateInnkeeperHook is called before a innkeeper is created. This hook prepares the proxy request to be sent to PostgREST. After request is formatted, it is returned and sent to the PostgREST API.

func PreCreatePilgrimHook

func PreCreatePilgrimHook(c *gin.Context) ([]byte, error)

PreCreatePilgrimHook is called before a pilgrim is created. This hook prepares the proxy request to be sent to PostgREST. After request is formatted, it is returned and sent to the PostgREST API.

func PreCreateProjectHook

func PreCreateProjectHook(c *gin.Context, audience string) ([]byte, error)

PreCreateProjectHook is called before a project is created. This hook creates objects in the cluster corresponding to the create project request. After objects are created, a new request body is returned which will be sent to the client.

func PreDeleteProjectHook

func PreDeleteProjectHook(c *gin.Context, audience string, subject string) error

PreDeleteProjectHook is called before project is deleted. This hook deletes objects in the cluster corresponding to the delete project request.

func PreEditInnkeeperHook

func PreEditInnkeeperHook(c *gin.Context) ([]byte, error)

PreEditInnkeeperHook is called before a innkeeper is edited. This hook prepares the proxy request to be sent to PostgREST. After request is formatted, it is returned and sent to the PostgREST API.

func PreEditPilgrimHook

func PreEditPilgrimHook(c *gin.Context) ([]byte, error)

PreEditPilgrimHook is called before a pilgrim is edited. This hook prepares the proxy request to be sent to PostgREST. After request is formatted, it is returned and sent to the PostgREST API.

Types

type InnkeeperCreateRequestBody

type InnkeeperCreateRequestBody struct {
	Username string `json:"username"`
	Password string `json:"passwd"`
	Email    string `json:"email"`
}

InnkeeperCreateRequestBody represents the HTTP request when a innkeeper is to be created

type InnkeeperEditRequestBody

type InnkeeperEditRequestBody struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Password string `json:"passwd"`
	Email    string `json:"email"`
}

InnkeeperEditRequestBody represents the HTTP request when details of an innkeeper are to be changed

type PilgrimCreateRequestBody

type PilgrimCreateRequestBody struct {
	Organization string `json:"organization"`
	Description  string `json:"description"`
	Username     string `json:"username"`
	Password     string `json:"passwd"`
	Email        string `json:"email"`
	Status       string `json:"status"`
}

PilgrimCreateRequestBody represents the HTTP request when a pilgrim is to be created

type PilgrimEditRequestBody

type PilgrimEditRequestBody struct {
	ID           string `json:"id"`
	Organization string `json:"organization"`
	Description  string `json:"description"`
	Username     string `json:"username"`
	Password     string `json:"passwd"`
	Email        string `json:"email"`
	Status       string `json:"status"`
}

PilgrimEditRequestBody represents the HTTP request when details of an pilgrim are to be changed

type ProjectCreateRequestBody

type ProjectCreateRequestBody struct {
	PilgrimID string `json:"pilgrimid"`
	Title     string `json:"title"`
	Details   string `json:"details"`
	CPU       int64  `json:"cpu"`
	Memory    int64  `json:"memory"`
	Storage   int64  `json:"storage"`
}

ProjectCreateRequestBody represents the HTTP request when a project is to be created

Jump to

Keyboard shortcuts

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