tpl

package
v0.0.0-...-d9ff241 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddRegistriesInput

type AddRegistriesInput struct {
	*RegistryInput
	Registries []*RegistryInput `json:"registries"`
}

AddRegistriesInput ...

func (*AddRegistriesInput) Validate

func (t *AddRegistriesInput) Validate() error

Validate 实现 gear.BodyTemplate

type Bundle

type Bundle struct {
	OTID      *otgo.OTID `json:"otid,omitempty"`
	Provider  *otgo.OTID `json:"provider,omitempty"`
	BundleID  string     `json:"bundleId"`
	Extension string     `json:"extension"`
}

Bundle ...

type ErrorResponseType

type ErrorResponseType = gear.ErrorResponse

ErrorResponseType 定义了标准的 API 接口错误时返回数据模型

type OTIDURL

type OTIDURL struct {
	OTID otgo.OTID `param:"otid"`
}

OTIDURL ...

func (*OTIDURL) Validate

func (t *OTIDURL) Validate() error

Validate ...

type Permission

type Permission struct {
	Resource   string   `json:"resource"`
	Operations []string `json:"operations"`
	Extensions []string `json:"extensions"`
}

Permission ...

type RegistryInput

type RegistryInput struct {
	SubjectID        string   `json:"subjectId"`
	SubjectType      string   `json:"subjectType"`
	Description      string   `json:"description"`
	Keys             []string `json:"keys"`
	ServiceEndpoints []string `json:"serviceEndpoints"`
	OTID             otgo.OTID
}

RegistryInput ...

func (*RegistryInput) Validate

func (t *RegistryInput) Validate() error

Validate 实现 gear.BodyTemplate

type RegistryPayload

type RegistryPayload struct {
	OTID             *otgo.OTID    `json:"otid"`
	Status           int           `json:"status"`
	SubjectID        string        `json:"subjectId,omitempty"`
	SubjectType      string        `json:"subjectType,omitempty"`
	Description      *string       `json:"description,omitempty"`
	Keys             *[]string     `json:"keys,omitempty"`
	CreatedAt        *int64        `json:"createdAt,omitempty"`
	UpdatedAt        *int64        `json:"updatedAt,omitempty"`
	KeysUpdatedAt    *int64        `json:"keysUpdatedAt,omitempty"`
	ServiceEndpoints *[]string     `json:"serviceEndpoints,omitempty"`
	Bundles          *[]Bundle     `json:"bundles,omitempty"`
	Permissions      *[]Permission `json:"permissions,omitempty"`
}

RegistryPayload ...

type ResponseType

type ResponseType struct {
	ErrorResponseType
	SuccessResponseType
}

ResponseType ...

type SignInput

type SignInput struct {
	Subject        otgo.OTID              `json:"sub"` // 申请签发 OTVID 的 sub,可以是联盟信任域的 sub
	Audience       otgo.OTID              `json:"aud"` // 申请签发 OTVID 的 aud,可以是联盟信任域的 aud
	Expiry         int64                  `json:"exp"`
	ReleaseID      string                 `json:"rid"`
	Claims         map[string]interface{} `json:"claims"`         // 需要包含的其它签发数据
	ForwardedOTVID string                 `json:"forwardedOtvid"` // 请求主体与 sub 不一致则是代理申请,且请求主体不是联盟域,需要 sub 的自签发 OTVID
}

SignInput ...

func (*SignInput) Validate

func (t *SignInput) Validate() error

Validate ...

type SignPayload

type SignPayload struct {
	Issuer           otgo.OTID `json:"iss"`
	Audience         otgo.OTID `json:"aud"`
	Expiry           int64     `json:"exp"`
	OTVID            string    `json:"otvid"`
	ServiceEndpoints []string  `json:"serviceEndpoints"`
}

SignPayload ...

type SuccessResponseType

type SuccessResponseType struct {
	TotalSize     int         `json:"totalSize,omitempty"`
	NextPageToken string      `json:"nextPageToken,omitempty"`
	Result        interface{} `json:"result"`
}

SuccessResponseType 定义了标准的 API 接口成功时返回数据模型

type UpdateUsersBundleInput

type UpdateUsersBundleInput struct {
	Provider *otgo.OTID `json:"provider,omitempty"`
	Bundles  []*struct {
		OTID      otgo.OTID `json:"otid"`
		BundleID  string    `json:"bundleId"`
		Extension string    `json:"extension"`
	} `json:"bundles"`
}

UpdateUsersBundleInput ...

func (*UpdateUsersBundleInput) Validate

func (t *UpdateUsersBundleInput) Validate() error

Validate 实现 gear.BodyTemplate

type VerifyInput

type VerifyInput struct {
	Audience otgo.OTID `json:"aud"`
	OTVID    string    `json:"otvid"`
}

VerifyInput ...

func (*VerifyInput) Validate

func (t *VerifyInput) Validate() error

Validate ...

Jump to

Keyboard shortcuts

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