certificate

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllEndpoint = &xreq.Endpoint{
	Path:       "/certificates",
	Method:     http.MethodGet,
	Handler:    xreq.Convert(AllAction),
	Authorizer: iauth.FA(iauth.FeatureCert, iauth.ActionReadAll),
}

AllRoute route AUTO GEN BY ctrl, MODIFY AS U NEED

View Source
var CreateEndpoint = &xreq.Endpoint{
	Path:       "/certificates",
	Method:     http.MethodPost,
	Handler:    xreq.Convert(CreateAction),
	Authorizer: iauth.FA(iauth.FeatureCert, iauth.ActionCreate),
}

CreateRoute route AUTO GEN BY ctrl, MODIFY AS U NEED

View Source
var DeleteEndpoint = &xreq.Endpoint{
	Path:       "/certificates/{cert_name}",
	Method:     http.MethodDelete,
	Handler:    xreq.Convert(DeleteAction),
	Authorizer: iauth.FA(iauth.FeatureCert, iauth.ActionDelete),
}

DeleteRoute route AUTO GEN BY ctrl, MODIFY AS U NEED

View Source
var UpdateEndpoint = &xreq.Endpoint{
	Path:       "/certificates/{cert_name}/default",
	Method:     http.MethodPatch,
	Handler:    xreq.Convert(UpdateAction),
	Authorizer: iauth.FA(iauth.FeatureCert, iauth.ActionUpdate),
}

UpdateRoute route AUTO GEN BY ctrl, MODIFY AS U NEED

Functions

func AllAction

func AllAction(req *http.Request) (interface{}, error)

AllAction action AUTO GEN BY ctrl, MODIFY AS U NEED

func CreateAction

func CreateAction(req *http.Request) (interface{}, error)

CreateAction action AUTO GEN BY ctrl, MODIFY AS U NEED

func DeleteAction

func DeleteAction(req *http.Request) (interface{}, error)

DeleteAction action AUTO GEN BY ctrl, MODIFY AS U NEED

func UpdateAction

func UpdateAction(req *http.Request) (interface{}, error)

UpdateAction action AUTO GEN BY ctrl, MODIFY AS U NEED

Types

type CreateParam

type CreateParam struct {
	Name *string `json:"cert_name" validate:"required,min=2"`

	Description *string `json:"description" validate:"required,min=2"`
	IsDefault   *bool   `json:"is_default" validate:"required"`

	CertFileName    *string `json:"cert_file_name" validate:"required,min=2"`
	CertFileContent *string `json:"cert_file_content" validate:"required,min=2"`
	KeyFileName     *string `json:"key_file_name" validate:"required,min=2"`
	KeyFileContent  *string `json:"key_file_content" validate:"required,min=2"`
	ExpiredDate     *string `json:"expired_date" validate:"required,min=2"`
}

CreateParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

type OneData

type OneData struct {
	CertName    string `json:"cert_name" uri:"cert_name"`
	Description string `json:"description"`
	IsDefault   bool   `json:"is_default"`

	CertFileName string `json:"cert_file_name"`
	KeyFileName  string `json:"key_file_name"`
	ExpiredDate  string `json:"expired_date"`
}

OneData Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

type OneParam

type OneParam struct {
	CertName *string `uri:"cert_name" validate:"required,min=2"`
}

OneParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

type UpdateParam

type UpdateParam struct {
	CertName *string `uri:"cert_name" validate:"required,min=2"`
}

UpdateParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

Jump to

Keyboard shortcuts

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