v1

package
v0.0.0-...-617b798 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificateRequest

func CreateCertificateRequest(c *gin.Context)

CreateCertificateRequest create a new CSR records in database @Summary create a new CSR records in database @Description create a new CSR records in database @Produce json @Tags Certificate @Param body body Certificate true "body" @Success 200 {string} string "ok" @Failure 400 {string} string "err" @Failure 401 {string} string "err" @Failure 500 {string} string "err" @Router /api/v1/cert [post]

func CreateNamespace

func CreateNamespace(c *gin.Context)

func CreateSecret

func CreateSecret(c *gin.Context)

CreateSecret create a secret record in database, sensitive fields of info are encrypted or hashed.

func GetCertificate

func GetCertificate(c *gin.Context)

func GetSecret

func GetSecret(c *gin.Context)

func ListNamespaces

func ListNamespaces(c *gin.Context)

func Ping

func Ping(c *gin.Context)

Ping responses pong to the client. It can be used for service probing @Summary Response to service probing @Description probing @Produce json @Success 200 {string} string "ok" "PONG" @Router /api/v1/ping [get]

Types

type CACertificate

type CACertificate struct {
	Certificate string `json:"ca"`
}

type Certificate

type Certificate struct {
	ID          uint   `json:"id"`
	Name        string `json:"name"`
	SignRequest string `json:"req"`
	Certificate string `json:"certificate"`
	Token       string `json:"token"`
}

type KvResponse

type KvResponse struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

type Namespace

type Namespace struct {
	ID        uint   `json:"namespace_id"`
	Name      string `json:"name"`
	MasterKey string `json:"master_key"`
	Nonce     string `json:"nonce"`
}

type Secret

type Secret struct {
	ID          uint      `json:"id"`
	Key         string    `json:"key"`
	Value       string    `json:"value"`
	NamespaceID uint      `json:"namespace_id"`
	Namespace   Namespace `json:"namespace"`
}

Jump to

Keyboard shortcuts

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