Documentation
¶
Overview ¶
Package rest provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.
Index ¶
- Constants
- func New(listenAddr string, logger *slog.Logger, svcGw *services.ServiceGateway, ...) (applications.Application, error)
- type AddressMetadata
- type AliasData
- type ApiTokenData
- type ApiTokenDataOnCreate
- type Application
- func (a *Application) CreateAlias(w http.ResponseWriter, r *http.Request)
- func (a *Application) CreateApiToken(w http.ResponseWriter, r *http.Request)
- func (a *Application) CreateChain(w http.ResponseWriter, r *http.Request)
- func (a *Application) CreateDomain(w http.ResponseWriter, r *http.Request)
- func (a *Application) CreatePrAddr(w http.ResponseWriter, r *http.Request)
- func (a *Application) CreateUser(w http.ResponseWriter, r *http.Request)
- func (a *Application) DeleteAlias(w http.ResponseWriter, r *http.Request)
- func (a *Application) DeleteApiToken(w http.ResponseWriter, r *http.Request)
- func (a *Application) DeleteChain(w http.ResponseWriter, r *http.Request)
- func (a *Application) DeleteDomain(w http.ResponseWriter, r *http.Request)
- func (a *Application) DeletePrAddr(w http.ResponseWriter, r *http.Request)
- func (a *Application) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetAliaseById(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetAliases(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetAllPrAddrs(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetApiTokenById(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetApiTokens(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetDomains(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetPrAddrById(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetUserById(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetUserProfile(w http.ResponseWriter, r *http.Request)
- func (a *Application) GetUsers(w http.ResponseWriter, r *http.Request)
- func (a *Application) Start() error
- func (a *Application) UpdateAlias(w http.ResponseWriter, r *http.Request)
- func (a *Application) UpdateApiToken(w http.ResponseWriter, r *http.Request)
- func (a *Application) UpdateDomain(w http.ResponseWriter, r *http.Request)
- func (a *Application) UpdatePrAddr(w http.ResponseWriter, r *http.Request)
- func (a *Application) UpdateUser(w http.ResponseWriter, r *http.Request)
- func (a *Application) VerifyDomain(w http.ResponseWriter, r *http.Request)
- type AuthForm
- type BasicAuthForm
- type BasicAuthenticationTokenResponse
- type ChainAddressData
- type ChainData
- type CreateAliasJSONBody
- type CreateAliasJSONRequestBody
- type CreateAliasRequest
- type CreateAliasResponse
- type CreateApiToken
- type CreateApiTokenJSONBody
- type CreateApiTokenJSONRequestBody
- type CreateApiTokenResponse
- type CreateChainJSONBody
- type CreateChainJSONRequestBody
- type CreateDomainJSONBody
- type CreateDomainJSONRequestBody
- type CreateDomainRequest
- type CreateDomainResponse
- type CreateEmailChain
- type CreateEmailChainResponse
- type CreatePrAddrJSONBody
- type CreatePrAddrJSONRequestBody
- type CreatePrAddrResponse
- type CreateProtectedAddressRequest
- type CreateUserJSONBody
- type CreateUserJSONRequestBody
- type CreateUserRequest
- type CreateUserResponse
- type DomainData
- type DomainType
- type DomainVerificationDNSRecordType
- type DomainVerificationData
- type DomainVerificationType
- type Error
- type ErrorResponse
- type GetAliasDetailsResponse
- type GetAliasesParams
- type GetAliasesResponse
- type GetApiTokenDetailsResponse
- type GetApiTokensResponse
- type GetDomainsParams
- type GetDomainsResponse
- type GetEmailChainDetailsResponse
- type GetPrAddrDetailsResponse
- type GetPrAddrsParams
- type GetPrAddrsResponse
- type GetSystemInfoResponse
- type GetSystemVersionResponse
- type GetUserDetailsResponse
- type GetUsersParams
- type GetUsersResponse
- type HTTP400
- type HTTP401
- type HTTP403
- type HTTP404
- type PaginationMetadata
- type ProtectedAddressData
- type SystemInfoData
- type SystemVersionData
- type UpdateAliasJSONBody
- type UpdateAliasJSONRequestBody
- type UpdateAliasRequest
- type UpdateAliasResponse
- type UpdateApiToken
- type UpdateApiTokenJSONBody
- type UpdateApiTokenJSONRequestBody
- type UpdateApiTokenResponse
- type UpdateDomainJSONBody
- type UpdateDomainJSONRequestBody
- type UpdateDomainRequest
- type UpdateDomainResponse
- type UpdatePrAddrJSONBody
- type UpdatePrAddrJSONRequestBody
- type UpdatePrAddrResponse
- type UpdateProtectedAddressRequest
- type UpdateUserJSONBody
- type UpdateUserJSONRequestBody
- type UpdateUserRequest
- type UpdateUserResponse
- type UserData
Constants ¶
const ( ApiTokenScopes apiTokenContextKey = "ApiToken.Scopes" BasicAuthenticationScopes basicAuthenticationContextKey = "BasicAuthentication.Scopes" OAuth2Scopes oAuth2ContextKey = "OAuth2.Scopes" )
const (
DefaultListenAddr string = "127.0.0.1:8808"
)
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( listenAddr string, logger *slog.Logger, svcGw *services.ServiceGateway, tls_key, tls_cert string, providersConfig map[string]config.ConfigOIDC, version config.SystemVersion, sysInfo config.SystemInfo, ) (applications.Application, error)
New creates and returns a new Application instance configured for REST API handling. It validates and initializes all required components including services, logging, and auth providers.
Parameters:
- listenAddr: Network address to listen on (uses DefaultListenAddr if empty)
- logger: Structured logger for application logging
- svcGw: Service gateway containing business logic implementations
- tls_key: Path to TLS private key file
- tls_cert: Path to TLS certificate file
- providersConfig: Map of OIDC provider configurations
Returns:
- applications.Application: Configured application instance
- error: Non-nil if initialization fails
Types ¶
type AddressMetadata ¶
type AddressMetadata struct {
Comment *string `json:"comment,omitempty"`
ServiceName *string `json:"service_name,omitempty"`
}
AddressMetadata defines model for addressMetadata.
type AliasData ¶
type AliasData struct {
// Active Indicates whether the Alias is active and can be used
Active *bool `json:"active,omitempty"`
// Email Email of the Alias
Email openapi_types.Email `json:"email"`
// ForwardEmail forward email for alias address
ForwardEmail openapi_types.Email `json:"forward_email"`
// Id alias address id
Id string `json:"id"`
Metadata AddressMetadata `json:"metadata"`
Owner UserData `json:"owner"`
}
AliasData Address of type "alias" data structure
type ApiTokenData ¶ added in v0.0.9
type ApiTokenData struct {
// Active Indicates whether the API token is active and can be used
Active bool `json:"active"`
// Description Optional details about the API token
Description *string `json:"description,omitempty"`
// Expiration Time of expiration of the API token
Expiration time.Time `json:"expiration"`
// Id API token ULID ID
Id *string `json:"id,omitempty"`
// Name Name of the API token
Name string `json:"name"`
}
ApiTokenData defines model for apiTokenData.
type ApiTokenDataOnCreate ¶ added in v0.0.9
type ApiTokenDataOnCreate struct {
// Active Indicates whether the API token is active and can be used
Active bool `json:"active"`
// ApiToken Clear text API token value; only returned when API token created first time
ApiToken string `json:"api_token"`
// Description Optional details about the API token
Description *string `json:"description,omitempty"`
// Expiration Time of expiration of the API token
Expiration time.Time `json:"expiration"`
// Id API token ULID ID
Id *string `json:"id,omitempty"`
// Name Name of the API token
Name string `json:"name"`
}
ApiTokenDataOnCreate defines model for apiTokenDataOnCreate.
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application represents the main structure for handling REST API requests. It contains references to a service gateway for business logic, network configuration, application context, logging, authentication settings, and OIDC provider configurations.
func (*Application) CreateAlias ¶
func (a *Application) CreateAlias(w http.ResponseWriter, r *http.Request)
CreateAlias handles the creation of a new alias in the system. It processes the incoming HTTP request containing the protected address ID and metadata, creates a new alias associated with the current user (temporarily using first user until authentication is implemented), and returns the created alias details in the response.
func (*Application) CreateApiToken ¶ added in v0.0.9
func (a *Application) CreateApiToken(w http.ResponseWriter, r *http.Request)
CreateApiToken creates a new API token for the authenticated user. It accepts a request containing token name, description, and expiration time.
Request Body:
- Name: Name of the token (required)
- Description: Description of the token (optional)
- ExpireIn: Token expiration time in seconds
Returns:
- 200 OK with the created token details on success
- Error response if user authentication, request parsing, or token creation fails
func (*Application) CreateChain ¶
func (a *Application) CreateChain(w http.ResponseWriter, r *http.Request)
func (*Application) CreateDomain ¶ added in v0.20.0
func (a *Application) CreateDomain(w http.ResponseWriter, r *http.Request)
func (*Application) CreatePrAddr ¶
func (a *Application) CreatePrAddr(w http.ResponseWriter, r *http.Request)
CreatePrAddr creates a new protected address for the current user.
func (*Application) CreateUser ¶
func (a *Application) CreateUser(w http.ResponseWriter, r *http.Request)
CreateUser creates a new user based on the provided request and returns the created user details.
func (*Application) DeleteAlias ¶
func (a *Application) DeleteAlias(w http.ResponseWriter, r *http.Request)
DeleteAlias deletes an alias by its ID. It validates the alias ID, performs the deletion, and returns a no-content response on success.
func (*Application) DeleteApiToken ¶ added in v0.0.9
func (a *Application) DeleteApiToken(w http.ResponseWriter, r *http.Request)
DeleteApiToken deletes an API token for the authenticated user. It requires the token ID as a path parameter.
Returns:
- 200 OK with the deleted token details on success
- Error response if user authentication, token validation, or deletion fails
func (*Application) DeleteChain ¶
func (a *Application) DeleteChain(w http.ResponseWriter, r *http.Request)
func (*Application) DeleteDomain ¶ added in v0.20.0
func (a *Application) DeleteDomain(w http.ResponseWriter, r *http.Request)
func (*Application) DeletePrAddr ¶
func (a *Application) DeletePrAddr(w http.ResponseWriter, r *http.Request)
DeletePrAddr deletes a protected address by its ID.
func (*Application) DeleteUser ¶
func (a *Application) DeleteUser(w http.ResponseWriter, r *http.Request)
DeleteUser deletes a user by their ID and returns the deleted user's details.
func (*Application) GetAliaseById ¶
func (a *Application) GetAliaseById(w http.ResponseWriter, r *http.Request)
GetAliaseById retrieves an alias by its ID from the system. It validates the provided ID, fetches the corresponding alias details, and returns them in the HTTP response. If the alias is not found or there's an error, it returns an appropriate error response.
func (*Application) GetAliases ¶
func (a *Application) GetAliases(w http.ResponseWriter, r *http.Request)
GetAliases retrieves a list of aliases based on optional filters for id and service name. It validates any provided IDs, fetches the aliases for the current user, and returns them in the HTTP response. Currently uses a temporary owner until authentication is implemented.
func (*Application) GetAllPrAddrs ¶
func (a *Application) GetAllPrAddrs(w http.ResponseWriter, r *http.Request)
GetAllPrAddrs retrieves all protected addresses for the current user. Supports filtering by ID and email through query parameters.
func (*Application) GetApiTokenById ¶ added in v0.0.9
func (a *Application) GetApiTokenById(w http.ResponseWriter, r *http.Request)
GetApiTokenById retrieves a specific API token by its ID for the authenticated user. It requires the token ID as a path parameter.
Returns:
- 200 OK with token details on success
- Error response if user authentication or token retrieval fails
func (*Application) GetApiTokens ¶ added in v0.0.9
func (a *Application) GetApiTokens(w http.ResponseWriter, r *http.Request)
GetApiTokens retrieves all API tokens associated with the authenticated user. It returns a list of API tokens in the response.
Returns:
- 200 OK with list of API tokens on success
- Error response if user authentication or token retrieval fails
func (*Application) GetDomains ¶ added in v0.18.0
func (a *Application) GetDomains(w http.ResponseWriter, r *http.Request)
func (*Application) GetPrAddrById ¶
func (a *Application) GetPrAddrById(w http.ResponseWriter, r *http.Request)
GetPrAddrById retrieves a single protected address by its ID.
func (*Application) GetUserById ¶
func (a *Application) GetUserById(w http.ResponseWriter, r *http.Request)
GetUserById retrieves a user by their ID and returns the user details.
func (*Application) GetUserProfile ¶ added in v0.4.0
func (a *Application) GetUserProfile(w http.ResponseWriter, r *http.Request)
func (*Application) GetUsers ¶
func (a *Application) GetUsers(w http.ResponseWriter, r *http.Request)
GetUsers retrieves all users and returns them as a response.
func (*Application) Start ¶
func (a *Application) Start() error
Start initializes and starts the HTTP server for the Ovoo API. It sets up all API routes, middleware chains, and starts the HTTPS server.
The server provides endpoints for: - User management (/api/v1/users/*) - API token management (/api/v1/users/apitokens/*) - Alias management (/api/v1/aliases/*) - Protected address management (/api/v1/praddrs/*) - Chain management (/api/v1/chains/*) - Authentication flows - API documentation
Parameters:
- ctx: Context for server lifecycle management
Returns:
- error: Non-nil if server fails to start or encounters fatal error
func (*Application) UpdateAlias ¶
func (a *Application) UpdateAlias(w http.ResponseWriter, r *http.Request)
UpdateAlias modifies an existing alias based on the provided update request. It can update the protected address ID and metadata of the alias. The function validates the alias ID, retrieves the current alias, applies the requested changes, and returns the updated alias in the response.
func (*Application) UpdateApiToken ¶ added in v0.0.9
func (a *Application) UpdateApiToken(w http.ResponseWriter, r *http.Request)
UpdateApiToken updates an existing API token for the authenticated user. It accepts a request containing updated token name, description, and active status.
Request Body:
- Name: Updated name of the token (optional)
- Description: Updated description of the token (optional)
- Active: Updated status of the token (optional)
Returns:
- 200 OK with the updated token details on success
- Error response if user authentication, request parsing, or token update fails
func (*Application) UpdateDomain ¶ added in v0.20.0
func (a *Application) UpdateDomain(w http.ResponseWriter, r *http.Request)
func (*Application) UpdatePrAddr ¶
func (a *Application) UpdatePrAddr(w http.ResponseWriter, r *http.Request)
UpdatePrAddr updates an existing protected address by its ID.
func (*Application) UpdateUser ¶
func (a *Application) UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser updates an existing user's information and returns the updated user details.
func (*Application) VerifyDomain ¶ added in v0.20.0
func (a *Application) VerifyDomain(w http.ResponseWriter, r *http.Request)
type BasicAuthForm ¶
type BasicAuthForm struct {
Password string `json:"password"`
// User user name
User string `json:"user"`
}
BasicAuthForm defines model for basicAuthForm.
type BasicAuthenticationTokenResponse ¶
type BasicAuthenticationTokenResponse struct {
// Expiry time of token expiration
Expiry string `json:"expiry"`
// Token signed JWT token for stateless authentication
Token string `json:"token"`
}
BasicAuthenticationTokenResponse defines model for basicAuthenticationTokenResponse.
type ChainAddressData ¶ added in v0.1.4
ChainAddressData defines model for chainAddressData.
type ChainData ¶
type ChainData struct {
FromEmail string `json:"from_email"`
Hash string `json:"hash"`
OrigFromAddress ChainAddressData `json:"orig_from_address"`
OrigToAddress ChainAddressData `json:"orig_to_address"`
ToEmail string `json:"to_email"`
}
ChainData defines model for chainData.
type CreateAliasJSONBody ¶
type CreateAliasJSONBody struct {
// CustomPrefix Custom prefix to be used when generating new alias
CustomPrefix *string `json:"custom_prefix,omitempty"`
// DomainId Target domain ID for alias generation
DomainId string `json:"domain_id"`
Metadata AddressMetadata `json:"metadata"`
ProtectedAddressId string `json:"protected_address_id"`
}
CreateAliasJSONBody defines parameters for CreateAlias.
type CreateAliasJSONRequestBody ¶
type CreateAliasJSONRequestBody CreateAliasJSONBody
CreateAliasJSONRequestBody defines body for CreateAlias for application/json ContentType.
type CreateAliasRequest ¶
type CreateAliasRequest struct {
// CustomPrefix Custom prefix to be used when generating new alias
CustomPrefix *string `json:"custom_prefix,omitempty"`
// DomainId Target domain ID for alias generation
DomainId string `json:"domain_id"`
Metadata AddressMetadata `json:"metadata"`
ProtectedAddressId string `json:"protected_address_id"`
}
CreateAliasRequest defines model for createAliasRequest.
type CreateAliasResponse ¶
type CreateAliasResponse = AliasData
CreateAliasResponse Address of type "alias" data structure
type CreateApiToken ¶ added in v0.0.9
type CreateApiToken struct {
Description *string `json:"description,omitempty"`
ExpireIn int `json:"expire_in"`
Name string `json:"name"`
}
CreateApiToken defines model for createApiToken.
type CreateApiTokenJSONBody ¶ added in v0.0.9
type CreateApiTokenJSONBody struct {
Description *string `json:"description,omitempty"`
ExpireIn int `json:"expire_in"`
Name string `json:"name"`
}
CreateApiTokenJSONBody defines parameters for CreateApiToken.
type CreateApiTokenJSONRequestBody ¶ added in v0.0.9
type CreateApiTokenJSONRequestBody CreateApiTokenJSONBody
CreateApiTokenJSONRequestBody defines body for CreateApiToken for application/json ContentType.
type CreateApiTokenResponse ¶ added in v0.0.9
type CreateApiTokenResponse = ApiTokenDataOnCreate
CreateApiTokenResponse defines model for createApiTokenResponse.
type CreateChainJSONBody ¶
type CreateChainJSONBody struct {
FromEmail openapi_types.Email `json:"from_email"`
ToEmail openapi_types.Email `json:"to_email"`
}
CreateChainJSONBody defines parameters for CreateChain.
type CreateChainJSONRequestBody ¶
type CreateChainJSONRequestBody CreateChainJSONBody
CreateChainJSONRequestBody defines body for CreateChain for application/json ContentType.
type CreateDomainJSONBody ¶ added in v0.20.0
type CreateDomainJSONBody struct {
// Name Domain name (e.g. example.com)
Name string `json:"name"`
// Type Enum defining type of the custom domain.
Type DomainType `json:"type"`
// VerificationType Enum defining domain ownership validation type: DNS TXT, DNS CNAME
VerificationType DomainVerificationType `json:"verification_type"`
}
CreateDomainJSONBody defines parameters for CreateDomain.
type CreateDomainJSONRequestBody ¶ added in v0.20.0
type CreateDomainJSONRequestBody CreateDomainJSONBody
CreateDomainJSONRequestBody defines body for CreateDomain for application/json ContentType.
type CreateDomainRequest ¶ added in v0.20.0
type CreateDomainRequest struct {
// Name Domain name (e.g. example.com)
Name string `json:"name"`
// Type Enum defining type of the custom domain.
Type DomainType `json:"type"`
// VerificationType Enum defining domain ownership validation type: DNS TXT, DNS CNAME
VerificationType DomainVerificationType `json:"verification_type"`
}
CreateDomainRequest defines model for createDomainRequest.
type CreateDomainResponse ¶ added in v0.20.0
type CreateDomainResponse = DomainData
CreateDomainResponse defines model for createDomainResponse.
type CreateEmailChain ¶
type CreateEmailChain struct {
FromEmail openapi_types.Email `json:"from_email"`
ToEmail openapi_types.Email `json:"to_email"`
}
CreateEmailChain defines model for createEmailChain.
type CreateEmailChainResponse ¶
type CreateEmailChainResponse = ChainData
CreateEmailChainResponse defines model for createEmailChainResponse.
type CreatePrAddrJSONBody ¶
type CreatePrAddrJSONBody struct {
Email string `json:"email"`
Metadata AddressMetadata `json:"metadata"`
}
CreatePrAddrJSONBody defines parameters for CreatePrAddr.
type CreatePrAddrJSONRequestBody ¶
type CreatePrAddrJSONRequestBody CreatePrAddrJSONBody
CreatePrAddrJSONRequestBody defines body for CreatePrAddr for application/json ContentType.
type CreatePrAddrResponse ¶
type CreatePrAddrResponse = ProtectedAddressData
CreatePrAddrResponse defines model for createPrAddrResponse.
type CreateProtectedAddressRequest ¶
type CreateProtectedAddressRequest struct {
Email string `json:"email"`
Metadata AddressMetadata `json:"metadata"`
}
CreateProtectedAddressRequest defines model for createProtectedAddressRequest.
type CreateUserJSONBody ¶
type CreateUserJSONBody struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Login string `json:"login"`
Password *string `json:"password,omitempty"`
Type string `json:"type"`
}
CreateUserJSONBody defines parameters for CreateUser.
type CreateUserJSONRequestBody ¶
type CreateUserJSONRequestBody CreateUserJSONBody
CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserRequest ¶
type CreateUserRequest struct {
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Login string `json:"login"`
Password *string `json:"password,omitempty"`
Type string `json:"type"`
}
CreateUserRequest defines model for createUserRequest.
type CreateUserResponse ¶
type CreateUserResponse = UserData
CreateUserResponse defines model for createUserResponse.
type DomainData ¶ added in v0.20.0
type DomainData struct {
Active bool `json:"active"`
// Id Domain ULID
Id string `json:"id"`
// Name Domain name (e.g. example.com)
Name string `json:"name"`
Owner *UserData `json:"owner,omitempty"`
// Type Enum defining type of the custom domain.
Type DomainType `json:"type"`
VerificationData *DomainVerificationData `json:"verification_data,omitempty"`
// Verified Present only for personal domains
Verified *bool `json:"verified,omitempty"`
// VerifiedAt Present only for personal domains
VerifiedAt *time.Time `json:"verified_at,omitempty"`
}
DomainData defines model for domainData.
type DomainType ¶ added in v0.20.0
type DomainType string
DomainType Enum defining type of the custom domain.
const ( Global DomainType = "global" Personal DomainType = "personal" )
Defines values for DomainType.
func (DomainType) Valid ¶ added in v0.20.0
func (e DomainType) Valid() bool
Valid indicates whether the value is a known member of the DomainType enum.
type DomainVerificationDNSRecordType ¶ added in v0.22.0
type DomainVerificationDNSRecordType string
DomainVerificationDNSRecordType Enum defining DNS record type for domain ownership validation via DNS: TXT, CNAME
const ( Cname DomainVerificationDNSRecordType = "cname" Txt DomainVerificationDNSRecordType = "txt" )
Defines values for DomainVerificationDNSRecordType.
func (DomainVerificationDNSRecordType) Valid ¶ added in v0.22.0
func (e DomainVerificationDNSRecordType) Valid() bool
Valid indicates whether the value is a known member of the DomainVerificationDNSRecordType enum.
type DomainVerificationData ¶ added in v0.22.0
type DomainVerificationData struct {
LastVerificationResult *string `json:"last_verification_result,omitempty"`
Name string `json:"name"`
// RecordType Enum defining DNS record type for domain ownership validation via DNS: TXT, CNAME
RecordType DomainVerificationDNSRecordType `json:"record_type"`
Value string `json:"value"`
}
DomainVerificationData defines model for domainVerificationData.
type DomainVerificationType ¶ added in v0.22.0
type DomainVerificationType string
DomainVerificationType Enum defining domain ownership validation type: DNS TXT, DNS CNAME
const ( DnsCname DomainVerificationType = "dns_cname" DnsTxt DomainVerificationType = "dns_txt" )
Defines values for DomainVerificationType.
func (DomainVerificationType) Valid ¶ added in v0.22.0
func (e DomainVerificationType) Valid() bool
Valid indicates whether the value is a known member of the DomainVerificationType enum.
type Error ¶
type Error struct {
// Detail Error details
Detail string `json:"detail"`
// Status HTTP status
Status string `json:"status"`
}
Error defines model for error.
type ErrorResponse ¶
type ErrorResponse struct {
Errors []Error `json:"errors"`
}
ErrorResponse defines model for errorResponse.
type GetAliasDetailsResponse ¶
type GetAliasDetailsResponse = AliasData
GetAliasDetailsResponse Address of type "alias" data structure
type GetAliasesParams ¶
type GetAliasesParams struct {
// Owner owner ID to fetch parameters for
Owner *string `form:"owner,omitempty" json:"owner,omitempty"`
// Email email of an alias to lookup
Email *string `form:"email,omitempty" json:"email,omitempty"`
// Id alias id to retrieve
Id *string `form:"id,omitempty" json:"id,omitempty"`
// ServiceName allows to lookup aliases by service name metadata field value
ServiceName *string `form:"service_name,omitempty" json:"service_name,omitempty"`
// Q partial-match search across email, service name, and comment
Q *string `form:"q,omitempty" json:"q,omitempty"`
}
GetAliasesParams defines parameters for GetAliases.
type GetAliasesResponse ¶
type GetAliasesResponse struct {
Aliases []AliasData `json:"aliases"`
PaginationMetadata PaginationMetadata `json:"pagination_metadata"`
}
GetAliasesResponse defines model for getAliasesResponse.
type GetApiTokenDetailsResponse ¶ added in v0.0.9
type GetApiTokenDetailsResponse = ApiTokenData
GetApiTokenDetailsResponse defines model for getApiTokenDetailsResponse.
type GetApiTokensResponse ¶ added in v0.0.9
type GetApiTokensResponse = []ApiTokenData
GetApiTokensResponse defines model for getApiTokensResponse.
type GetDomainsParams ¶ added in v0.20.0
type GetDomainsParams struct {
// DomainName FQDN to lookup within the scope available to the user
DomainName *string `form:"domain_name,omitempty" json:"domain_name,omitempty"`
// Active include domains with defined 'active' value (true or false)
Active *string `form:"active,omitempty" json:"active,omitempty"`
// Verified include domains with defined 'verified' value (true or false)
Verified *string `form:"verified,omitempty" json:"verified,omitempty"`
// IncludeGlobal also include global domains in the list
IncludeGlobal *string `form:"include_global,omitempty" json:"include_global,omitempty"`
}
GetDomainsParams defines parameters for GetDomains.
type GetDomainsResponse ¶ added in v0.18.0
type GetDomainsResponse struct {
Domains []DomainData `json:"domains"`
PaginationMetadata PaginationMetadata `json:"pagination_metadata"`
}
GetDomainsResponse defines model for getDomainsResponse.
type GetEmailChainDetailsResponse ¶
type GetEmailChainDetailsResponse = ChainData
GetEmailChainDetailsResponse defines model for getEmailChainDetailsResponse.
type GetPrAddrDetailsResponse ¶
type GetPrAddrDetailsResponse = ProtectedAddressData
GetPrAddrDetailsResponse defines model for getPrAddrDetailsResponse.
type GetPrAddrsParams ¶
type GetPrAddrsParams struct {
Id *string `form:"id,omitempty" json:"id,omitempty"`
Email *string `form:"email,omitempty" json:"email,omitempty"`
// Q partial-match search across email and comment
Q *string `form:"q,omitempty" json:"q,omitempty"`
}
GetPrAddrsParams defines parameters for GetPrAddrs.
type GetPrAddrsResponse ¶
type GetPrAddrsResponse struct {
PaginationMetadata PaginationMetadata `json:"pagination_metadata"`
ProtectedAddresses []ProtectedAddressData `json:"protected_addresses"`
}
GetPrAddrsResponse defines model for getPrAddrsResponse.
type GetSystemInfoResponse ¶ added in v0.22.1
type GetSystemInfoResponse = SystemInfoData
GetSystemInfoResponse defines model for getSystemInfoResponse.
type GetSystemVersionResponse ¶ added in v0.13.0
type GetSystemVersionResponse = SystemVersionData
GetSystemVersionResponse defines model for getSystemVersionResponse.
type GetUserDetailsResponse ¶
type GetUserDetailsResponse = UserData
GetUserDetailsResponse defines model for getUserDetailsResponse.
type GetUsersParams ¶ added in v0.4.0
type GetUsersParams struct {
// Id user id filter
Id *string `form:"id,omitempty" json:"id,omitempty"`
// Login user login filter
Login *string `form:"login,omitempty" json:"login,omitempty"`
// Type user type filter
Type *string `form:"type,omitempty" json:"type,omitempty"`
}
GetUsersParams defines parameters for GetUsers.
type GetUsersResponse ¶
type GetUsersResponse struct {
PaginationMetadata PaginationMetadata `json:"pagination_metadata"`
Users []UserData `json:"users"`
}
GetUsersResponse defines model for getUsersResponse.
type PaginationMetadata ¶ added in v0.5.0
type PaginationMetadata struct {
CurrentPage int `json:"current_page"`
FirstPage int `json:"first_page"`
LastPage int `json:"last_page"`
PageSize int `json:"page_size"`
TotalRecords int `json:"total_records"`
}
PaginationMetadata defines model for paginationMetadata.
type ProtectedAddressData ¶
type ProtectedAddressData struct {
// Active Indicates whether the Protected Address is active and can be used
Active *bool `json:"active,omitempty"`
Email openapi_types.Email `json:"email"`
Id string `json:"id"`
Metadata *AddressMetadata `json:"metadata,omitempty"`
Owner UserData `json:"owner"`
}
ProtectedAddressData defines model for protectedAddressData.
type SystemInfoData ¶ added in v0.22.1
type SystemInfoData struct {
// DkimDomain DKIM default domain should be used in custom domain CNAME records
DkimDomain string `json:"dkim_domain"`
// DkimSelector DKIM default selector should be used in custom domain CNAME records
DkimSelector string `json:"dkim_selector"`
}
SystemInfoData defines model for systemInfoData.
type SystemVersionData ¶ added in v0.13.0
type SystemVersionData struct {
// BuiltAt Build timestamp
BuiltAt string `json:"built_at"`
// GitCommit Git commit ID (full)
GitCommit string `json:"git_commit"`
// Version Semantic version number
Version string `json:"version"`
}
SystemVersionData defines model for systemVersionData.
type UpdateAliasJSONBody ¶
type UpdateAliasJSONBody struct {
Active *bool `json:"active,omitempty"`
Metadata *AddressMetadata `json:"metadata,omitempty"`
}
UpdateAliasJSONBody defines parameters for UpdateAlias.
type UpdateAliasJSONRequestBody ¶
type UpdateAliasJSONRequestBody UpdateAliasJSONBody
UpdateAliasJSONRequestBody defines body for UpdateAlias for application/json ContentType.
type UpdateAliasRequest ¶
type UpdateAliasRequest struct {
Active *bool `json:"active,omitempty"`
Metadata *AddressMetadata `json:"metadata,omitempty"`
}
UpdateAliasRequest defines model for updateAliasRequest.
type UpdateAliasResponse ¶
type UpdateAliasResponse = AliasData
UpdateAliasResponse Address of type "alias" data structure
type UpdateApiToken ¶ added in v0.0.9
type UpdateApiToken struct {
Active *bool `json:"active,omitempty"`
Description *string `json:"description,omitempty"`
Name *string `json:"name,omitempty"`
}
UpdateApiToken defines model for updateApiToken.
type UpdateApiTokenJSONBody ¶ added in v0.0.9
type UpdateApiTokenJSONBody struct {
Active *bool `json:"active,omitempty"`
Description *string `json:"description,omitempty"`
Name *string `json:"name,omitempty"`
}
UpdateApiTokenJSONBody defines parameters for UpdateApiToken.
type UpdateApiTokenJSONRequestBody ¶ added in v0.0.9
type UpdateApiTokenJSONRequestBody UpdateApiTokenJSONBody
UpdateApiTokenJSONRequestBody defines body for UpdateApiToken for application/json ContentType.
type UpdateApiTokenResponse ¶ added in v0.0.9
type UpdateApiTokenResponse = ApiTokenData
UpdateApiTokenResponse defines model for updateApiTokenResponse.
type UpdateDomainJSONBody ¶ added in v0.20.0
type UpdateDomainJSONBody struct {
Active *bool `json:"active,omitempty"`
}
UpdateDomainJSONBody defines parameters for UpdateDomain.
type UpdateDomainJSONRequestBody ¶ added in v0.20.0
type UpdateDomainJSONRequestBody UpdateDomainJSONBody
UpdateDomainJSONRequestBody defines body for UpdateDomain for application/json ContentType.
type UpdateDomainRequest ¶ added in v0.20.0
type UpdateDomainRequest struct {
Active *bool `json:"active,omitempty"`
}
UpdateDomainRequest defines model for updateDomainRequest.
type UpdateDomainResponse ¶ added in v0.20.0
type UpdateDomainResponse = DomainData
UpdateDomainResponse defines model for updateDomainResponse.
type UpdatePrAddrJSONBody ¶
type UpdatePrAddrJSONBody struct {
Active *bool `json:"active,omitempty"`
Metadata *AddressMetadata `json:"metadata,omitempty"`
}
UpdatePrAddrJSONBody defines parameters for UpdatePrAddr.
type UpdatePrAddrJSONRequestBody ¶
type UpdatePrAddrJSONRequestBody UpdatePrAddrJSONBody
UpdatePrAddrJSONRequestBody defines body for UpdatePrAddr for application/json ContentType.
type UpdatePrAddrResponse ¶
type UpdatePrAddrResponse = ProtectedAddressData
UpdatePrAddrResponse defines model for updatePrAddrResponse.
type UpdateProtectedAddressRequest ¶
type UpdateProtectedAddressRequest struct {
Active *bool `json:"active,omitempty"`
Metadata *AddressMetadata `json:"metadata,omitempty"`
}
UpdateProtectedAddressRequest defines model for updateProtectedAddressRequest.
type UpdateUserJSONBody ¶
type UpdateUserJSONBody struct {
Active *bool `json:"active,omitempty"`
FirstName *string `json:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty"`
Type *string `json:"type,omitempty"`
}
UpdateUserJSONBody defines parameters for UpdateUser.
type UpdateUserJSONRequestBody ¶
type UpdateUserJSONRequestBody UpdateUserJSONBody
UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Active *bool `json:"active,omitempty"`
FirstName *string `json:"first_name,omitempty"`
LastName *string `json:"last_name,omitempty"`
Type *string `json:"type,omitempty"`
}
UpdateUserRequest defines model for updateUserRequest.
type UpdateUserResponse ¶
type UpdateUserResponse = UserData
UpdateUserResponse defines model for updateUserResponse.
type UserData ¶
type UserData struct {
// Active Indicates whether the user is active
Active *bool `json:"active,omitempty"`
// FailedAttempts number of failed authentication attempts
FailedAttempts *int `json:"failed_attempts,omitempty"`
// FirstName user first name
FirstName string `json:"first_name"`
// Id user id
Id string `json:"id"`
// LastName user last name
LastName string `json:"last_name"`
// LockoutUntil date/time the user account was lockout until
LockoutUntil *string `json:"lockout_until,omitempty"`
// Login user login (for OIDC support should be formatted as email)
Login string `json:"login"`
// Type user type
Type string `json:"type"`
}
UserData defines model for userData.