client

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURL = "https://cm.harica.gr"

	LoginPath     = "/api/User/Login"
	LoginPathTotp = "/api/User/Login2FA"

	CreatePrevalidaitonPath = "/api/OrganizationAdmin/CreatePrevalidatedValidation"
	GetOrganizationsPath    = "/api/OrganizationAdmin/GetOrganizations"

	UpdateReviewsPath             = "/api/OrganizationValidatorSSL/UpdateReviews"
	GetReviewableTransactionsPath = "/api/OrganizationValidatorSSL/GetSSLReviewableTransactions"
	RevokeCertificatePath         = "/api/OrganizationValidatorSSL/RevokeCertificate"

	GetCertificatePath    = "/api/Certificate/GetCertificate"
	RevocationReasonsPath = "/api/Certificate/GetRevocationReasons"

	DomainValidationsPath         = "/api/ServerCertificate/GetDomainValidations"
	CheckMatchingOrganizationPath = "/api/ServerCertificate/CheckMachingOrganization"
	CheckDomainNamesPath          = "/api/ServerCertificate/CheckDomainNames"
	RequestServerCertificatePath  = "/api/ServerCertificate/RequestServerCertificate"
	GetMyTransactionsPath         = "/api/ServerCertificate/GetMyTransactions"

	ApplicationJson = "application/json"
	DnsValidation   = "3.2.2.4.7"
)

Variables

This section is empty.

Functions

func ParseCSR added in v1.2.0

func ParseCSR(csr []byte) (*x509.CertificateRequest, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(user, password, totpSeed string, options ...Option) (*Client, error)

func (*Client) ApproveRequest

func (c *Client) ApproveRequest(id, message, value string) error

func (*Client) CheckDomainNames

func (c *Client) CheckDomainNames(domains []string) ([]models.DomainResponse, error)

func (*Client) CheckMatchingOrganization

func (c *Client) CheckMatchingOrganization(domains []string) ([]models.OrganizationResponse, error)

func (*Client) GetCertificate

func (c *Client) GetCertificate(id string) (*models.CertificateResponse, error)

func (*Client) GetMyTransactions added in v1.3.0

func (c *Client) GetMyTransactions() ([]models.TransactionResponse, error)

func (*Client) GetOrganizations

func (c *Client) GetOrganizations() ([]models.Organization, error)

func (*Client) GetPendingReviews

func (c *Client) GetPendingReviews() ([]models.ReviewResponse, error)

func (*Client) GetRevocationReasons

func (c *Client) GetRevocationReasons() ([]models.RevocationReasonsResponse, error)

func (*Client) RequestCertificate

func (c *Client) RequestCertificate(domains []string, csr string, transactionType string, organization models.OrganizationResponse) (*models.CertificateRequestResponse, error)

func (*Client) RevokeCertificate

func (c *Client) RevokeCertificate(reason models.RevocationReasonsResponse, comment string, transactionId string) error

func (*Client) SessionRefresh added in v1.1.0

func (c *Client) SessionRefresh(force bool) error

func (*Client) TriggerValidation

func (c *Client) TriggerValidation(organizatonId, email string) error

type Domain

type Domain struct {
	Domain string `json:"domain"`
}

type Option

type Option func(*Client)

func WithDebug

func WithDebug(debug bool) Option

func WithRefreshInterval added in v1.1.0

func WithRefreshInterval(interval time.Duration) Option

type UnexpectedResponseCodeError added in v1.4.0

type UnexpectedResponseCodeError struct {
	Code int
}

func (*UnexpectedResponseCodeError) Error added in v1.4.0

type UnexpectedResponseContentTypeError

type UnexpectedResponseContentTypeError struct {
	ContentType string
}

func (*UnexpectedResponseContentTypeError) Error

Jump to

Keyboard shortcuts

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