misc

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MyUserHandler

func MyUserHandler(ctx *gin.Context)

MyUserHandler godoc

@summary		Get information about the calling user
@description	Get Sherlock's understanding of the calling user based on IAP and the Firecloud.org Google Workspace organization.
@tags			Misc
@produce		json
@success		200		{object}	misc.MyUserResponse
@failure		407,500	{object}	errors.ErrorResponse
@router			/my-user [get]

func StatusHandler

func StatusHandler(ctx *gin.Context)

StatusHandler godoc

@summary		Get Sherlock's current status
@description	Get Sherlock's current status. Right now, this endpoint always returned OK (if the server is online).
@description	This endpoint is acceptable to use for a readiness check.
@tags			Misc
@produce		json
@success		200	{object}	misc.StatusResponse
@router			/status [get]

func VersionHandler

func VersionHandler(ctx *gin.Context)

VersionHandler godoc

@summary		Get Sherlock's own current version
@description	Get the build version of this Sherlock instance.
@tags			Misc
@produce		json
@success		200	{object}	misc.VersionResponse
@router			/version [get]

Types

type MyUserResponse

type MyUserResponse struct {
	Email       string            `json:"email"`
	Suitability string            `json:"suitability"`
	RawInfo     *auth_models.User `json:"rawInfo"`
}

type StatusResponse

type StatusResponse struct {
	OK bool `json:"ok"`
}

type VersionResponse

type VersionResponse struct {
	Version   string            `json:"version"`
	GoVersion string            `json:"goVersion,omitempty"`
	BuildInfo map[string]string `json:"buildInfo,omitempty"`
}

Jump to

Keyboard shortcuts

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