api

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 11 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.16.2 DO NOT EDIT.

Index

Constants

View Source
const (
	Pat_basicScopes  = "pat_basic.Scopes"
	Pat_bearerScopes = "pat_bearer.Scopes"
)

Variables

View Source
var (
	ErrSignedOut = errors.New("sign in required")
)

Functions

func Client

func Client(cfg *cli.Config) (*http.Client, error)

TODO: maybe make this return a real client, not an http.Client

Types

type AuthCliCodesResponse added in v0.0.5

type AuthCliCodesResponse struct {
	// DeviceCode Unique code associated with origin device for CLI auth flow.
	DeviceCode string `json:"device_code"`

	// ExpiresIn Number of seconds until device and user codes expire, defaults to 900s (15m).
	ExpiresIn int32 `json:"expires_in"`

	// Interval Minimum number of seconds to wait before re-polling during CLI auth flow, defaults to 5s.
	Interval int32 `json:"interval"`

	// UserCode User verification code to be presented for the user to enter into a browser, formed by 8 characters with a hyphen in the middle.
	UserCode string `json:"user_code"`

	// VerificationUri The URL where the user will need to enter their code to complete the CLI auth flow.
	VerificationUri string `json:"verification_uri"`
}

AuthCliCodesResponse defines model for auth_cli_codes_response.

type AuthCliPatTokensResponse added in v0.0.5

type AuthCliPatTokensResponse struct {
	// PatToken Authenticated token for user API interactions.
	PatToken string `json:"pat_token"`
}

AuthCliPatTokensResponse defines model for auth_cli_pat_tokens_response.

type CreateCliTokenJSONBody added in v0.0.5

type CreateCliTokenJSONBody struct {
	// DeviceCode Unique code associated with origin device for CLI auth flow.
	DeviceCode string `json:"device_code"`
}

CreateCliTokenJSONBody defines parameters for CreateCliToken.

type CreateCliTokenJSONRequestBody added in v0.0.5

type CreateCliTokenJSONRequestBody CreateCliTokenJSONBody

CreateCliTokenJSONRequestBody defines body for CreateCliToken for application/json ContentType.

type CreateEabTokenJSONBody added in v0.0.7

type CreateEabTokenJSONBody struct {
	Organization struct {
		// Name unique name of organization to create EAB tokens within
		Name string `json:"name"`
	} `json:"organization"`
	Realm struct {
		// Name unique name of realm to create EAB tokens within
		Name string `json:"name"`
	} `json:"realm"`
}

CreateEabTokenJSONBody defines parameters for CreateEabToken.

type CreateEabTokenJSONRequestBody added in v0.0.7

type CreateEabTokenJSONRequestBody CreateEabTokenJSONBody

CreateEabTokenJSONRequestBody defines body for CreateEabToken for application/json ContentType.

type Credential added in v0.0.1

type Credential struct {
	// CreatedAt UTC time when credential was created.
	CreatedAt time.Time `json:"created_at"`

	// Name name of credential
	Name string `json:"name"`

	// Revision Current revision of credential
	Revision int64 `json:"revision"`

	// RevokedAt UTC time after which credential will be revoked
	RevokedAt *time.Time `json:"revoked_at"`

	// Serial serial id for credetial
	Serial string `json:"serial"`

	// SignatureAlgorithm Algorithm used to sign credential
	SignatureAlgorithm interface{} `json:"signature_algorithm"`

	// Status current status of credential
	Status CredentialStatus `json:"status"`

	// TextualEncoding base64 textual encoding of credential based on RFC7468
	TextualEncoding string `json:"textual_encoding"`

	// Uuid uuid for credential
	Uuid *openapi_types.UUID `json:"uuid,omitempty"`

	// ValidAfter UTC time after which credential will be valid.
	ValidAfter time.Time `json:"valid_after"`

	// ValidBefore UTC time after which credential will no longer be valid.
	ValidBefore time.Time `json:"valid_before"`
}

Credential defines model for credential.

type CredentialStatus added in v0.0.1

type CredentialStatus string

CredentialStatus current status of credential

const (
	Expired CredentialStatus = "expired"
	Online  CredentialStatus = "online"
	Revoked CredentialStatus = "revoked"
)

Defines values for CredentialStatus.

type Eab added in v0.0.7

type Eab struct {
	// HmacKey EAB HMAC key
	HmacKey string `json:"hmac_key"`

	// Kid EAB key identifier
	Kid string `json:"kid"`
}

Eab defines model for eab.

type Error

type Error struct {
	// Detail A human-readable description of this occurrence of the problem.
	Detail string `json:"detail"`

	// Status HTTP status code of this occurrence of the problem.
	Status int32 `json:"status"`

	// Title A human-readable description of this problem type.
	Title string `json:"title"`

	// Type URI identifying problem.
	Type string `json:"type"`
}

Error defines model for error.

type GetCredentialsParams added in v0.0.1

type GetCredentialsParams struct {
	// CaParam ca for operation
	CaParam *QueryCaParam `form:"ca_param,omitempty" json:"ca_param,omitempty"`
}

GetCredentialsParams defines parameters for GetCredentials.

type PathOrgParam

type PathOrgParam = string

PathOrgParam defines model for path_org_param.

type PathRealmParam

type PathRealmParam = string

PathRealmParam defines model for path_realm_param.

type QueryCaParam

type QueryCaParam = string

QueryCaParam defines model for query_ca_param.

type Root

type Root struct {
	PersonalOrg struct {
		Slug *string `json:"slug,omitempty"`
	} `json:"personal_org"`
	Whoami string `json:"whoami"`
}

Root defines model for root.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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