workload

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI() *API

func (*API) CertDetail

func (a *API) CertDetail(c *helper.HTTPWrapContext) (interface{}, error)

CertDetail Certificate details @Tags Workload @Summary Detail @Description Certificate details @Produce json @Param sn query string true "Certificate sn" @Param aki query string true "Certificate aki" @Success 200 {object} helper.MSPNormalizeHTTPResponseBody{data=schema.FullCert} " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/cert [get]

func (*API) CertList

func (a *API) CertList(c *helper.HTTPWrapContext) (interface{}, error)

CertList Certificate list @Tags Workload @Summary (p3)List @Description Certificate list @Produce json @Param role query string false "Certificate type default" @Param unique_id query string false "Query by unique ID" @Param cert_sn query string false "Query by certificate serial number" @Param status query string false "Certificate status good/revoked" @Param order query string false "Sort, default issued_at desc" @Param expiry_start_time query string false "Expiration, starting point" @Param expiry_end_time query string false "Expiration, end time point" @Param limit_num query int false "Paging parameters, default 20" @Param page query int false "Number of pages, default 1" @Success 200 {object} helper.MSPNormalizeHTTPResponseBody{data=helper.MSPNormalizeList{list=[]schema.SampleCert}} " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/certs [get]

func (*API) ForbidNewCerts

func (a *API) ForbidNewCerts(c *helper.HTTPWrapContext) (interface{}, error)

ForbidNewCerts Prohibit a uniqueID from requesting a certificate @Tags Workload @Summary Application for certificate is prohibited @Description Prohibit a uniqueID from requesting a certificate @Produce json @Param body body logic.ForbidNewCertsParams true " " @Success 200 {object} helper.MSPNormalizeHTTPResponseBody " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/lifecycle/forbid_new_certs [post]

func (*API) ForbidUnit

func (a *API) ForbidUnit(c *helper.HTTPWrapContext) (interface{}, error)

ForbidUnit Revoke and prohibit service certificates @Tags Workload @Summary (p1)Revoke and prohibit service certificates @Description Revoke and prohibit service certificates @Produce json @Param json body ForbidUnitParams true " " @Success 200 {object} helper.MSPNormalizeHTTPResponseBody " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/lifecycle/forbid_unit [post]

func (*API) RecoverCerts

func (a *API) RecoverCerts(c *helper.HTTPWrapContext) (interface{}, error)

RecoverCerts Restore certificate @Tags Workload @Summary (p3)Recover @Description Restore certificate @Produce json @Param body body logic.RecoverCertsParams true "sn+aki / unique_id either-or" @Success 200 {object} helper.MSPNormalizeHTTPResponseBody " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/lifecycle/recover [post]

func (*API) RecoverForbidNewCerts

func (a *API) RecoverForbidNewCerts(c *helper.HTTPWrapContext) (interface{}, error)

RecoverForbidNewCerts Recovery allows a uniqueID to request a certificate @Tags Workload @Summary Resume application certificate @Description Recovery allows a uniqueID to request a certificate @Produce json @Param body body logic.ForbidNewCertsParams true " " @Success 200 {object} helper.MSPNormalizeHTTPResponseBody " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/lifecycle/recover_forbid_new_certs [post]

func (*API) RecoverUnit

func (a *API) RecoverUnit(c *helper.HTTPWrapContext) (interface{}, error)

RecoverUnit Restore and allow service certificates @Tags Workload @Summary (p1)Restore and allow service certificates @Description Restore and allow service certificates @Produce json @Param json body ForbidUnitParams true " " @Success 200 {object} helper.MSPNormalizeHTTPResponseBody " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/lifecycle/recover_unit [post]

func (*API) RevokeCerts

func (a *API) RevokeCerts(c *helper.HTTPWrapContext) (interface{}, error)

RevokeCerts revoked certificate @Tags Workload @Summary (p3)Revoke @Description revoked certificate @Produce json @Param body body logic.RevokeCertsParams true "sn+aki / unique_id pick one of two" @Success 200 {object} helper.MSPNormalizeHTTPResponseBody " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/lifecycle/revoke [post]

func (*API) UnitsCertsList

func (a *API) UnitsCertsList(c *helper.HTTPWrapContext) (interface{}, error)

UnitsCertsList List of service certificates Deprecated @Tags Workload @Summary (p1)List of service certificates @Description List of service certificates @Produce json @Param unique_id query string false "Query unique_id" @Param role query string false "Certificate type" @Param expiry_start_time query string false "Expiration, starting point" @Param expiry_end_time query string false "Expiration, end time point" @Param is_forbid query int false "Disable, 1 disable, 2 enable" @Param limit_num query int false "Paging parameters, default 20" @Param page query int false "Number of pages, default 1" @Success 200 {object} helper.MSPNormalizeHTTPResponseBody{data=[]UnitsCertsItem} " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/units_certs_list [get]

func (*API) UnitsForbidQuery

func (a *API) UnitsForbidQuery(c *helper.HTTPWrapContext) (interface{}, error)

UnitsForbidQuery Query unique_ Is ID prohibited from applying for certificate @Tags Workload @Summary Prohibit applying for certificate query @Description Query unique_id Is it forbidden to apply for certificate @Produce json @Param unique_ids query []string true "Query unique_ID array" collectionFormat(multi) @Success 200 {object} helper.MSPNormalizeHTTPResponseBody{data=logic.UnitsForbidQueryResult} " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/units_forbid_query [get]

func (*API) UnitsStatus

func (a *API) UnitsStatus(c *helper.HTTPWrapContext) (interface{}, error)

UnitsStatus Service corresponding status query @Tags Workload @Summary (p1)Service corresponding status query @Description Service corresponding status query @Produce json @Param json body UnitsStatusReq true "Query unique_ID array" @Success 200 {object} helper.MSPNormalizeHTTPResponseBody{data=object} " " @Failure 400 {object} helper.HTTPWrapErrorResponse @Failure 500 {object} helper.HTTPWrapErrorResponse @Router /workload/units_status [post]

type ForbidUnitParams

type ForbidUnitParams struct {
	UniqueID string `json:"unique_id" binding:"required"`
}

type UnitsCertsItem

type UnitsCertsItem struct {
	Certs     []*schema.FullCert `json:"certs"`
	UniqueID  string             `json:"unique_id"`
	Forbidden bool               `json:"forbidden"`
}

type UnitsStatusItem

type UnitsStatusItem struct {
	Active bool `json:"active"`
}

type UnitsStatusMap

type UnitsStatusMap map[string]*UnitsStatusItem

type UnitsStatusReq

type UnitsStatusReq struct {
	UniqueIds []string `json:"unique_ids" binding:"required"`
}

Jump to

Keyboard shortcuts

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