Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- Variables
- func PointerTo[T any](v T) *T
- func ProvisionCert(eab *Eab, domains []string, acmeURL string) (*tls.Certificate, error)
- type AttachDomainJSONBody
- type AttachDomainJSONRequestBody
- type AttachOrgServiceJSONBody
- type AttachOrgServiceJSONRequestBody
- type Attachment
- type Attachments
- type AuthCliCodesResponse
- type AuthCliPatTokensResponse
- type Chain
- type Client
- type ClientType
- type CreateCliTokenJSONBody
- type CreateCliTokenJSONRequestBody
- type CreateClientJSONBody
- type CreateClientJSONRequestBody
- type CreateDomainJSONBody
- type CreateDomainJSONRequestBody
- type CreateEabTokenJSONBody
- type CreateEabTokenJSONBodyIdentifiersType
- type CreateEabTokenJSONRequestBody
- type CreateOrgJSONBody
- type CreateOrgJSONRequestBody
- type CreateServiceJSONBody
- type CreateServiceJSONRequestBody
- type Credential
- type CredentialStatus
- type Credentials
- type DetachOrgServiceJSONBody
- type DetachOrgServiceJSONRequestBody
- type Domain
- type Domains
- type Eab
- type EabIdentifiersType
- type Error
- type Filter
- type Filters
- type GetCredentialsParams
- type Middleware
- type MiddlewareFunc
- type Middlewares
- type Organization
- type Organizations
- type PathDomainParam
- type PathEabTokenParam
- type PathOrgParam
- type PathRealmParam
- type PathServiceParam
- type QueryCaParam
- type QueryParam
- type QueryParams
- type QuerySubjectUidParam
- type Realm
- type Realms
- type RelationshipsAcmeCaApid
- type RelationshipsChainApid
- type RelationshipsChainSlug
- type RelationshipsDomainApid
- type RelationshipsOrganizationApid
- type RelationshipsOrganizationSlug
- type RelationshipsRealmApid
- type RelationshipsRealmSlug
- type RelationshipsServiceApid
- type RelationshipsServiceSlug
- type RelationshipsServiceSlugNullable
- type RelationshipsSubCaApidNullable
- type RelationshipsSubCaSlug
- type Root
- type RoundTripFunc
- type Service
- type ServiceServerType
- type Services
- type ServicesXtach
- type ServicesXtach200
- type Session
- func (s *Session) AttachService(ctx context.Context, chainSlug string, domains []string, ...) (*ServicesXtach200, error)
- func (s *Session) CreateEAB(ctx context.Context, ...) (*Eab, error)
- func (s *Session) CreateOrg(ctx context.Context, orgName string) (*Organization, error)
- func (s *Session) CreatePATToken(ctx context.Context, deviceCode string) (string, error)
- func (s *Session) CreateService(ctx context.Context, orgSlug, serviceName, serverType string, ...) (*Service, error)
- func (s *Session) FetchCredentials(ctx context.Context, orgSlug, realmSlug string) ([]Credential, error)
- func (s *Session) GenerateUserFlowCodes(ctx context.Context, source string) (*AuthCliCodesResponse, error)
- func (s *Session) GetCredentials(ctx context.Context, orgSlug, realmSlug string, params ...QueryParam) ([]Credential, error)
- func (s *Session) GetOrgRealms(ctx context.Context, orgApid string) ([]Realm, error)
- func (s *Session) GetOrgServices(ctx context.Context, orgSlug string, filters ...Filter[Service]) ([]Service, error)
- func (s *Session) GetOrgs(ctx context.Context) ([]Organization, error)
- func (s *Session) GetService(ctx context.Context, orgSlug, serviceSlug string) (*Service, error)
- func (s *Session) GetServiceAttachments(ctx context.Context, orgAPID string, serviceAPID string) ([]Attachment, error)
- func (s *Session) UserInfo(ctx context.Context) (*Root, error)
- type StatusCodeError
Constants ¶
const ( Pat_basicScopes = "pat_basic.Scopes" Pat_bearerScopes = "pat_bearer.Scopes" )
const NotFoundErr = StatusCodeError(http.StatusNotFound)
Variables ¶
var ( ErrSignedOut = errors.New("sign in required") ErrTransient = errors.New("transient error encountered, please retry") ErrGnomeKeyringRequired = fmt.Errorf("gnome-keyring required for secure credential storage: %w", ErrSignedOut) )
Functions ¶
func ProvisionCert ¶ added in v0.1.5
Types ¶
type AttachDomainJSONBody ¶ added in v0.1.12
type AttachDomainJSONBody struct {
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
AcmeCa *RelationshipsAcmeCaApid `json:"acme_ca,omitempty"`
Chain RelationshipsChainApid `json:"chain"`
Realm RelationshipsRealmApid `json:"realm"`
} `json:"relationships"`
}
AttachDomainJSONBody defines parameters for AttachDomain.
type AttachDomainJSONRequestBody ¶ added in v0.1.12
type AttachDomainJSONRequestBody AttachDomainJSONBody
AttachDomainJSONRequestBody defines body for AttachDomain for application/json ContentType.
type AttachOrgServiceJSONBody ¶ added in v0.0.8
type AttachOrgServiceJSONBody struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Chain RelationshipsChainSlug `json:"chain"`
Realm RelationshipsRealmSlug `json:"realm"`
} `json:"relationships"`
}
AttachOrgServiceJSONBody defines parameters for AttachOrgService.
type AttachOrgServiceJSONRequestBody ¶ added in v0.0.8
type AttachOrgServiceJSONRequestBody AttachOrgServiceJSONBody
AttachOrgServiceJSONRequestBody defines body for AttachOrgService for application/json ContentType.
type Attachment ¶ added in v0.0.38
type Attachment struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
// Port TCP port number for the service in the realm.
Port int32 `json:"port"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Chain RelationshipsChainApid `json:"chain"`
Organization RelationshipsOrganizationApid `json:"organization"`
Realm RelationshipsRealmApid `json:"realm"`
Service RelationshipsServiceApid `json:"service"`
SubCa RelationshipsSubCaApidNullable `json:"sub_ca"`
} `json:"relationships"`
}
Attachment defines model for attachment.
type Attachments ¶ added in v0.0.38
type Attachments struct {
Items []Attachment `json:"items"`
}
Attachments defines model for attachments.
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 Chain ¶ added in v0.0.8
type Chain struct {
// Name The name of the chain.
Name string `json:"name"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Org RelationshipsOrganizationSlug `json:"org"`
Realm RelationshipsRealmSlug `json:"realm"`
} `json:"relationships"`
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
}
Chain defines model for chain.
type Client ¶
type Client struct {
// Name A name for the client.
Name string `json:"name"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Organization RelationshipsOrganizationSlug `json:"organization"`
Service RelationshipsServiceSlug `json:"service"`
} `json:"relationships"`
// Slug A value used as a parameter when referencing this client.
Slug string `json:"slug"`
// Type A type for the client.
Type ClientType `json:"type"`
}
Client defines model for client.
type ClientType ¶ added in v0.0.8
type ClientType string
ClientType A type for the client.
const ( ClientTypeCustom ClientType = "custom" ClientTypeGo ClientType = "go" ClientTypeJavascript ClientType = "javascript" ClientTypePython ClientType = "python" ClientTypeRuby ClientType = "ruby" )
Defines values for ClientType.
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 CreateClientJSONBody ¶ added in v0.0.8
type CreateClientJSONBody struct {
Relationships struct {
Organization RelationshipsOrganizationSlug `json:"organization"`
Service RelationshipsServiceSlug `json:"service"`
} `json:"relationships"`
ServerType string `json:"server_type"`
Type *string `json:"type,omitempty"`
}
CreateClientJSONBody defines parameters for CreateClient.
type CreateClientJSONRequestBody ¶ added in v0.0.8
type CreateClientJSONRequestBody CreateClientJSONBody
CreateClientJSONRequestBody defines body for CreateClient for application/json ContentType.
type CreateDomainJSONBody ¶ added in v0.1.12
type CreateDomainJSONBody struct {
// Fqdn The fully qualified domain name for the new domain.
Fqdn string `json:"fqdn"`
}
CreateDomainJSONBody defines parameters for CreateDomain.
type CreateDomainJSONRequestBody ¶ added in v0.1.12
type CreateDomainJSONRequestBody CreateDomainJSONBody
CreateDomainJSONRequestBody defines body for CreateDomain for application/json ContentType.
type CreateEabTokenJSONBody ¶ added in v0.0.7
type CreateEabTokenJSONBody struct {
// Identifiers An optional list of identifiers to limits what certificates this token may provision certificates for.
Identifiers *[]struct {
// Type A type for the identifier, only `dns` is supported at this time.
Type CreateEabTokenJSONBodyIdentifiersType `json:"type"`
// Value A value for the identifier.
Value string `json:"value"`
} `json:"identifiers,omitempty"`
Relationships struct {
Chain RelationshipsChainSlug `json:"chain"`
Organization RelationshipsOrganizationSlug `json:"organization"`
Realm RelationshipsRealmSlug `json:"realm"`
Service *RelationshipsServiceSlug `json:"service,omitempty"`
SubCa RelationshipsSubCaSlug `json:"sub_ca"`
} `json:"relationships"`
}
CreateEabTokenJSONBody defines parameters for CreateEabToken.
type CreateEabTokenJSONBodyIdentifiersType ¶ added in v0.1.11
type CreateEabTokenJSONBodyIdentifiersType string
CreateEabTokenJSONBodyIdentifiersType defines parameters for CreateEabToken.
const (
CreateEabTokenJSONBodyIdentifiersTypeDns CreateEabTokenJSONBodyIdentifiersType = "dns"
)
Defines values for CreateEabTokenJSONBodyIdentifiersType.
type CreateEabTokenJSONRequestBody ¶ added in v0.0.7
type CreateEabTokenJSONRequestBody CreateEabTokenJSONBody
CreateEabTokenJSONRequestBody defines body for CreateEabToken for application/json ContentType.
type CreateOrgJSONBody ¶ added in v0.1.7
type CreateOrgJSONBody struct {
// Name The name for the new organization.
Name string `json:"name"`
}
CreateOrgJSONBody defines parameters for CreateOrg.
type CreateOrgJSONRequestBody ¶ added in v0.1.7
type CreateOrgJSONRequestBody CreateOrgJSONBody
CreateOrgJSONRequestBody defines body for CreateOrg for application/json ContentType.
type CreateServiceJSONBody ¶ added in v0.0.8
type CreateServiceJSONBody struct {
LocalhostPort *int `json:"localhost_port,omitempty"`
Name string `json:"name"`
Relationships struct {
Organization RelationshipsOrganizationSlug `json:"organization"`
} `json:"relationships"`
ServerType string `json:"server_type"`
}
CreateServiceJSONBody defines parameters for CreateService.
type CreateServiceJSONRequestBody ¶ added in v0.0.8
type CreateServiceJSONRequestBody CreateServiceJSONBody
CreateServiceJSONRequestBody defines body for CreateService 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 credential
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 Credentials ¶ added in v0.0.8
type Credentials struct {
Items []Credential `json:"items"`
}
Credentials defines model for credentials.
type DetachOrgServiceJSONBody ¶ added in v0.0.8
type DetachOrgServiceJSONBody struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Chain RelationshipsChainSlug `json:"chain"`
Realm RelationshipsRealmSlug `json:"realm"`
} `json:"relationships"`
}
DetachOrgServiceJSONBody defines parameters for DetachOrgService.
type DetachOrgServiceJSONRequestBody ¶ added in v0.0.8
type DetachOrgServiceJSONRequestBody DetachOrgServiceJSONBody
DetachOrgServiceJSONRequestBody defines body for DetachOrgService for application/json ContentType.
type Domain ¶ added in v0.1.12
type Domain struct {
// Apid A value used as a parameter when referencing this organization.
Apid string `json:"apid"`
// Fqdn The fully qualified name of the domain.
Fqdn string `json:"fqdn"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Organization RelationshipsOrganizationApid `json:"organization"`
} `json:"relationships"`
// VerificationFqdn The fully qualified domain name to use as a CNAME for verification of the domain.
VerificationFqdn string `json:"verification_fqdn"`
}
Domain defines model for domain.
type Domains ¶ added in v0.1.12
type Domains struct {
Items []Domain `json:"items"`
}
Domains defines model for domains.
type Eab ¶ added in v0.0.7
type Eab struct {
// HmacKey EAB HMAC key
HmacKey string `json:"hmac_key"`
// Identifiers An optional list of identifiers to limits what certificates this token may provision certificates for.
Identifiers []struct {
// Type A type for the identifier, only `dns` is supported at this time.
Type EabIdentifiersType `json:"type"`
// Value A value for the identifier.
Value string `json:"value"`
} `json:"identifiers"`
// Kid EAB key identifier
Kid string `json:"kid"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Chain RelationshipsChainSlug `json:"chain"`
Organization RelationshipsOrganizationSlug `json:"organization"`
Realm RelationshipsRealmSlug `json:"realm"`
Service RelationshipsServiceSlugNullable `json:"service"`
SubCa RelationshipsSubCaSlug `json:"sub_ca"`
} `json:"relationships"`
}
Eab defines model for eab.
type EabIdentifiersType ¶ added in v0.1.11
type EabIdentifiersType string
EabIdentifiersType A type for the identifier, only `dns` is supported at this time.
const (
EabIdentifiersTypeDns EabIdentifiersType = "dns"
)
Defines values for EabIdentifiersType.
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"`
// SubjectUidParam subject uid for operation
SubjectUidParam *QuerySubjectUidParam `form:"subject_uid_param,omitempty" json:"subject_uid_param,omitempty"`
}
GetCredentialsParams defines parameters for GetCredentials.
type Middleware ¶ added in v0.0.39
type Middleware interface {
RoundTripper(next http.RoundTripper) http.RoundTripper
}
type MiddlewareFunc ¶ added in v0.0.39
type MiddlewareFunc func(next http.RoundTripper) http.RoundTripper
func (MiddlewareFunc) RoundTripper ¶ added in v0.0.39
func (fn MiddlewareFunc) RoundTripper(next http.RoundTripper) http.RoundTripper
type Middlewares ¶ added in v0.0.39
type Middlewares []Middleware
func (Middlewares) RoundTripper ¶ added in v0.0.39
func (m Middlewares) RoundTripper(tport *http.Transport) http.RoundTripper
type Organization ¶ added in v0.0.38
type Organization struct {
// Apid A value used as a parameter when referencing this organization.
Apid string `json:"apid"`
// Name The name for this organization.
Name string `json:"name"`
// Slug The slugified name for this organization.
Slug string `json:"slug"`
}
Organization defines model for organization.
func (Organization) Key ¶ added in v0.0.39
func (o Organization) Key() string
func (Organization) Plural ¶ added in v0.0.39
func (o Organization) Plural() string
func (Organization) Singular ¶ added in v0.0.39
func (o Organization) Singular() string
func (Organization) String ¶ added in v0.0.39
func (o Organization) String() string
type Organizations ¶ added in v0.0.38
type Organizations struct {
Items []Organization `json:"items"`
}
Organizations defines model for organizations.
type PathDomainParam ¶ added in v0.1.12
type PathDomainParam = string
PathDomainParam defines model for path_domain_param.
type PathEabTokenParam ¶ added in v0.1.12
type PathEabTokenParam = string
PathEabTokenParam defines model for path_eab_token_param.
type PathRealmParam ¶
type PathRealmParam = string
PathRealmParam defines model for path_realm_param.
type PathServiceParam ¶ added in v0.0.8
type PathServiceParam = string
PathServiceParam defines model for path_service_param.
type QueryParam ¶ added in v0.1.5
func SubCA ¶ added in v0.1.5
func SubCA(apid string) QueryParam
type QueryParams ¶ added in v0.1.5
type QueryParams []QueryParam
func (QueryParams) Apply ¶ added in v0.1.5
func (q QueryParams) Apply(u *url.URL)
type QuerySubjectUidParam ¶ added in v0.1.5
type QuerySubjectUidParam = string
QuerySubjectUidParam defines model for query_subject_uid_param.
type Realm ¶ added in v0.0.38
type Realm struct {
// Apid A value used as a parameter when referencing this realm.
Apid string `json:"apid"`
// Name The name for this realm.
Name string `json:"name"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Organization RelationshipsOrganizationApid `json:"organization"`
} `json:"relationships"`
// Slug The slugified name for this realm.
Slug string `json:"slug"`
}
Realm defines model for realm.
type Realms ¶ added in v0.0.38
type Realms struct {
Items []Realm `json:"items"`
}
Realms defines model for realms.
type RelationshipsAcmeCaApid ¶ added in v0.1.12
type RelationshipsAcmeCaApid struct {
// Apid A value used as a parameter when referencing this ACME CA.
Apid string `json:"apid"`
}
RelationshipsAcmeCaApid defines model for relationships_acme_ca_apid.
type RelationshipsChainApid ¶ added in v0.0.38
type RelationshipsChainApid struct {
// Apid A value used as a parameter when referencing this chain.
Apid string `json:"apid"`
}
RelationshipsChainApid defines model for relationships_chain_apid.
type RelationshipsChainSlug ¶ added in v0.0.38
type RelationshipsChainSlug struct {
// Slug A value used as a parameter when referencing this chain.
Slug string `json:"slug"`
}
RelationshipsChainSlug defines model for relationships_chain_slug.
type RelationshipsDomainApid ¶ added in v0.1.12
type RelationshipsDomainApid struct {
// Apid A value used as a parameter when referencing this domain.
Apid string `json:"apid"`
}
RelationshipsDomainApid defines model for relationships_domain_apid.
type RelationshipsOrganizationApid ¶ added in v0.0.38
type RelationshipsOrganizationApid struct {
// Apid A value used as a parameter when referencing this organization.
Apid string `json:"apid"`
}
RelationshipsOrganizationApid defines model for relationships_organization_apid.
type RelationshipsOrganizationSlug ¶ added in v0.0.38
type RelationshipsOrganizationSlug struct {
// Slug A value used as a parameter when referencing this organization.
Slug string `json:"slug"`
}
RelationshipsOrganizationSlug defines model for relationships_organization_slug.
type RelationshipsRealmApid ¶ added in v0.0.38
type RelationshipsRealmApid struct {
// Apid A value used as a parameter when referencing this realm.
Apid string `json:"apid"`
}
RelationshipsRealmApid defines model for relationships_realm_apid.
type RelationshipsRealmSlug ¶ added in v0.0.38
type RelationshipsRealmSlug struct {
// Slug A value used as a parameter when referencing this realm.
Slug string `json:"slug"`
}
RelationshipsRealmSlug defines model for relationships_realm_slug.
type RelationshipsServiceApid ¶ added in v0.0.38
type RelationshipsServiceApid struct {
// Apid A value used as a parameter when referencing this service.
Apid string `json:"apid"`
}
RelationshipsServiceApid defines model for relationships_service_apid.
type RelationshipsServiceSlug ¶ added in v0.0.38
type RelationshipsServiceSlug struct {
// Slug A value used as a parameter when referencing this service.
Slug string `json:"slug"`
}
RelationshipsServiceSlug defines model for relationships_service_slug.
type RelationshipsServiceSlugNullable ¶ added in v0.1.12
type RelationshipsServiceSlugNullable struct {
// Slug A value used as a parameter when referencing this service.
Slug *string `json:"slug"`
}
RelationshipsServiceSlugNullable defines model for relationships_service_slug_nullable.
type RelationshipsSubCaApidNullable ¶ added in v0.0.38
type RelationshipsSubCaApidNullable struct {
// Apid A value used as a parameter when referencing this sub_ca.
Apid *string `json:"apid"`
}
RelationshipsSubCaApidNullable defines model for relationships_sub_ca_apid_nullable.
type RelationshipsSubCaSlug ¶ added in v0.0.38
type RelationshipsSubCaSlug struct {
// Slug A value used as a parameter when referencing this sub_ca.
Slug string `json:"slug"`
}
RelationshipsSubCaSlug defines model for relationships_sub_ca_slug.
type Root ¶
type Root struct {
MinimumCliVersion string `json:"minimum_cli_version"`
PersonalOrg struct {
Slug string `json:"slug"`
} `json:"personal_org"`
Whoami string `json:"whoami"`
}
Root defines model for root.
type RoundTripFunc ¶ added in v0.0.39
type Service ¶ added in v0.0.8
type Service struct {
// LocalhostPort A port number for use on localhost or null.
LocalhostPort *int `json:"localhost_port"`
// Name A name for the service.
Name string `json:"name"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Organization RelationshipsOrganizationSlug `json:"organization"`
} `json:"relationships"`
// ServerType A server type for the service.
ServerType ServiceServerType `json:"server_type"`
// Slug A value used as a parameter when referencing this service.
Slug string `json:"slug"`
}
Service defines model for service.
func NonDiagnosticServices ¶ added in v0.0.39
type ServiceServerType ¶ added in v0.0.8
type ServiceServerType string
ServiceServerType A server type for the service.
const ( ServiceServerTypeCaddy ServiceServerType = "caddy" ServiceServerTypeCustom ServiceServerType = "custom" ServiceServerTypeDiagnostic ServiceServerType = "diagnostic" ServiceServerTypeGo ServiceServerType = "go" ServiceServerTypeJavascript ServiceServerType = "javascript" ServiceServerTypePython ServiceServerType = "python" ServiceServerTypeRuby ServiceServerType = "ruby" )
Defines values for ServiceServerType.
type Services ¶ added in v0.0.8
type Services struct {
Items []Service `json:"items"`
}
Services defines model for services.
type ServicesXtach ¶ added in v0.0.8
type ServicesXtach struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Chain RelationshipsChainSlug `json:"chain"`
Realm RelationshipsRealmSlug `json:"realm"`
} `json:"relationships"`
}
ServicesXtach defines model for services_xtach.
type ServicesXtach200 ¶ added in v0.0.8
type ServicesXtach200 struct {
// Domains A list of domains for this attachment.
Domains []string `json:"domains"`
// Relationships Values used as parameters when referencing related resources.
Relationships struct {
Chain RelationshipsChainSlug `json:"chain"`
Organization RelationshipsOrganizationSlug `json:"organization"`
Realm *RelationshipsRealmSlug `json:"realm,omitempty"`
Service RelationshipsServiceSlug `json:"service"`
SubCa RelationshipsSubCaSlug `json:"sub_ca"`
} `json:"relationships"`
}
ServicesXtach200 defines model for services_xtach_200.
type Session ¶ added in v0.0.8
func (*Session) AttachService ¶ added in v0.0.8
func (*Session) CreatePATToken ¶ added in v0.0.8
func (*Session) CreateService ¶ added in v0.0.8
func (*Session) FetchCredentials ¶ added in v0.0.8
func (*Session) GenerateUserFlowCodes ¶ added in v0.0.8
func (*Session) GetCredentials ¶ added in v0.1.5
func (s *Session) GetCredentials(ctx context.Context, orgSlug, realmSlug string, params ...QueryParam) ([]Credential, error)
func (*Session) GetOrgRealms ¶ added in v0.0.38
func (*Session) GetOrgServices ¶ added in v0.0.8
func (*Session) GetOrgs ¶ added in v0.0.38
func (s *Session) GetOrgs(ctx context.Context) ([]Organization, error)
func (*Session) GetService ¶ added in v0.0.8
func (*Session) GetServiceAttachments ¶ added in v0.0.38
type StatusCodeError ¶ added in v0.0.8
type StatusCodeError int
func (StatusCodeError) Error ¶ added in v0.0.8
func (err StatusCodeError) Error() string
func (StatusCodeError) StatusCode ¶ added in v0.0.8
func (err StatusCodeError) StatusCode() int