api

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type ApiError

type ApiError struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

ApiError defines model for ApiError.

type BundleDigest

type BundleDigest = string

BundleDigest base64 encoded SHA-256 digest of the bundle

type Certificate

type Certificate = string

Certificate X.509 certificate in PEM format

type ConsentStatus

type ConsentStatus string

ConsentStatus defines model for ConsentStatus.

const (
	Approved ConsentStatus = "approved"
	Denied   ConsentStatus = "denied"
	Pending  ConsentStatus = "pending"
)

Defines values for ConsentStatus.

type JWT

type JWT = string

JWT defines model for JWT.

type JoinToken

type JoinToken = UUID

JoinToken defines model for JoinToken.

type Relationship

type Relationship struct {
	CreatedAt           time.Time        `json:"created_at"`
	Id                  UUID             `json:"id"`
	TrustDomainAConsent ConsentStatus    `json:"trust_domain_a_consent"`
	TrustDomainAId      UUID             `json:"trust_domain_a_id"`
	TrustDomainAName    *TrustDomainName `json:"trust_domain_a_name,omitempty"`
	TrustDomainBConsent ConsentStatus    `json:"trust_domain_b_consent"`
	TrustDomainBId      UUID             `json:"trust_domain_b_id"`
	TrustDomainBName    *TrustDomainName `json:"trust_domain_b_name,omitempty"`
	UpdatedAt           time.Time        `json:"updated_at"`
}

Relationship defines model for Relationship.

func MapRelationships

func MapRelationships(relationships ...*entity.Relationship) []*Relationship

MapRelationships transforms a slice of Relationship entities to a slice of API Relationship representations. Parameters: - relationships: A slice of Relationship entities to be transformed. Return: A slice of API Relationship representations.

func RelationshipFromEntity

func RelationshipFromEntity(entity *entity.Relationship) *Relationship

func (Relationship) ToEntity

func (r Relationship) ToEntity() (*entity.Relationship, error)

type SPIFFEID

type SPIFFEID = string

SPIFFEID defines model for SPIFFEID.

type Signature

type Signature = string

Signature base64 encoded signature of the bundle

type TrustBundle

type TrustBundle = string

TrustBundle SPIFFE Trust bundle in JSON format

type TrustDomain

type TrustDomain struct {
	CreatedAt         time.Time       `json:"created_at"`
	Description       *string         `json:"description,omitempty"`
	HarvesterSpiffeId *SPIFFEID       `json:"harvester_spiffe_id,omitempty"`
	Id                UUID            `json:"id"`
	Name              TrustDomainName `json:"name"`

	// OnboardingBundle SPIFFE Trust bundle in JSON format
	OnboardingBundle *TrustBundle `json:"onboarding_bundle,omitempty"`
	UpdatedAt        time.Time    `json:"updated_at"`
}

TrustDomain defines model for TrustDomain.

func TrustDomainFromEntity

func TrustDomainFromEntity(entity *entity.TrustDomain) *TrustDomain

func (TrustDomain) ToEntity

func (td TrustDomain) ToEntity() (*entity.TrustDomain, error)

type TrustDomainName

type TrustDomainName = string

TrustDomainName defines model for TrustDomainName.

type UUID

type UUID = openapi_types.UUID

UUID defines model for UUID.

Jump to

Keyboard shortcuts

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