Documentation
¶
Index ¶
- func ApproveCSR(ac *client.AlpaconClient, csrId string) ([]byte, error)
- func ApproveRevokeRequest(ac *client.AlpaconClient, requestId string) ([]byte, error)
- func CancelRevokeRequest(ac *client.AlpaconClient, requestId string) error
- func DeleteCA(ac *client.AlpaconClient, authorityId string) error
- func DeleteCSR(ac *client.AlpaconClient, csrId string) error
- func DenyCSR(ac *client.AlpaconClient, csrId string) ([]byte, error)
- func DenyRevokeRequest(ac *client.AlpaconClient, requestId string) ([]byte, error)
- func DownloadCRL(ac *client.AlpaconClient, authorityId string, filePath string) error
- func DownloadCertificate(ac *client.AlpaconClient, certId string, filePath string) error
- func DownloadCertificateByCSR(ac *client.AlpaconClient, csrId string, filePath string) error
- func DownloadRootCertificate(ac *client.AlpaconClient, authorityId string, filePath string) error
- func GetAuthorityDetail(ac *client.AlpaconClient, authorityId string) ([]byte, error)
- func GetAuthorityIDByName(ac *client.AlpaconClient, name string) (string, error)
- func GetCSRDetail(ac *client.AlpaconClient, csrId string) ([]byte, error)
- func GetCertificateDetail(ac *client.AlpaconClient, certId string) ([]byte, error)
- func GetRevokeRequestDetail(ac *client.AlpaconClient, requestId string) ([]byte, error)
- func RetryCSR(ac *client.AlpaconClient, csrId string) ([]byte, error)
- func RetryRevokeRequest(ac *client.AlpaconClient, requestId string) ([]byte, error)
- func SubmitCSR(ac *client.AlpaconClient, csr []byte, submitURL string) error
- func UpdateAuthority(ac *client.AlpaconClient, authorityId string) ([]byte, error)
- type AuthorityAttributes
- type AuthorityCreateResponse
- type AuthorityDetails
- type AuthorityRequest
- type AuthorityResponse
- type AuthoritySummary
- type CRLResponse
- type CSRAttributes
- type CSRResponse
- type CSRSubmit
- type Certificate
- type CertificateAttributes
- type RevokeRequestAttributes
- type RevokeRequestCreate
- type RevokeRequestResponse
- type SignRequest
- type SignRequestDetail
- type SignRequestResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveCSR ¶
func ApproveCSR(ac *client.AlpaconClient, csrId string) ([]byte, error)
func ApproveRevokeRequest ¶ added in v1.2.0
func ApproveRevokeRequest(ac *client.AlpaconClient, requestId string) ([]byte, error)
func CancelRevokeRequest ¶ added in v1.2.0
func CancelRevokeRequest(ac *client.AlpaconClient, requestId string) error
func DenyRevokeRequest ¶ added in v1.2.0
func DenyRevokeRequest(ac *client.AlpaconClient, requestId string) ([]byte, error)
func DownloadCRL ¶ added in v1.2.0
func DownloadCRL(ac *client.AlpaconClient, authorityId string, filePath string) error
func DownloadCertificate ¶
func DownloadCertificate(ac *client.AlpaconClient, certId string, filePath string) error
func DownloadCertificateByCSR ¶ added in v1.0.0
func DownloadCertificateByCSR(ac *client.AlpaconClient, csrId string, filePath string) error
func DownloadRootCertificate ¶
func DownloadRootCertificate(ac *client.AlpaconClient, authorityId string, filePath string) error
func GetAuthorityDetail ¶
func GetAuthorityDetail(ac *client.AlpaconClient, authorityId string) ([]byte, error)
func GetAuthorityIDByName ¶ added in v1.2.2
func GetAuthorityIDByName(ac *client.AlpaconClient, name string) (string, error)
GetAuthorityIDByName resolves an authority name to its ID by fetching all authorities and matching by name. If name is already a UUID, it is returned as-is without making any API call, so callers may pass either a name or an ID.
func GetCSRDetail ¶
func GetCSRDetail(ac *client.AlpaconClient, csrId string) ([]byte, error)
func GetCertificateDetail ¶
func GetCertificateDetail(ac *client.AlpaconClient, certId string) ([]byte, error)
func GetRevokeRequestDetail ¶ added in v1.2.0
func GetRevokeRequestDetail(ac *client.AlpaconClient, requestId string) ([]byte, error)
func RetryCSR ¶ added in v1.2.0
func RetryCSR(ac *client.AlpaconClient, csrId string) ([]byte, error)
func RetryRevokeRequest ¶ added in v1.2.0
func RetryRevokeRequest(ac *client.AlpaconClient, requestId string) ([]byte, error)
func UpdateAuthority ¶ added in v1.2.0
func UpdateAuthority(ac *client.AlpaconClient, authorityId string) ([]byte, error)
Types ¶
type AuthorityAttributes ¶
type AuthorityAttributes struct {
ID string `json:"id" table:"ID"`
Name string `json:"name"`
Organization string `json:"organization"`
Domain string `json:"domain"`
RootValidDays int `json:"root_valid_days" table:"Root Valid Days"`
DefaultValidDays int `json:"default_valid_days" table:"Default Valid Days"`
MaxValidDays int `json:"max_valid_days" table:"Max Valid Days"`
Server string `json:"server"`
Owner string `json:"owner"`
SignedAt string `json:"signed_at" table:"Signed At"`
}
func GetAuthorityList ¶
func GetAuthorityList(ac *client.AlpaconClient) ([]AuthorityAttributes, error)
type AuthorityCreateResponse ¶
type AuthorityCreateResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Organization string `json:"organization"`
Domain string `json:"domain"`
RootValidDays int `json:"root_valid_days"`
DefaultValidDays int `json:"default_valid_days"`
MaxValidDays int `json:"max_valid_days"`
Agent types.ServerSummary `json:"agent"`
Owner types.UserSummary `json:"owner"`
Instruction string `json:"instruction"`
UpdatedAt time.Time `json:"updated_at"`
}
func CreateAuthority ¶
func CreateAuthority(ac *client.AlpaconClient, authorityRequest AuthorityRequest) (AuthorityCreateResponse, error)
type AuthorityDetails ¶
type AuthorityDetails struct {
ID string `json:"id"`
Name string `json:"name"`
Organization string `json:"organization"`
Domain string `json:"domain"`
Storage string `json:"storage"`
CrtText string `json:"crt_text"`
RootValidDays int `json:"root_valid_days"`
DefaultValidDays int `json:"default_valid_days"`
MaxValidDays int `json:"max_valid_days"`
RemoteIP string `json:"remote_ip"`
IsConnected bool `json:"is_connected"`
Status string `json:"status"`
Agent types.ServerSummary `json:"agent"`
Owner types.UserSummary `json:"owner"`
UpdatedAt time.Time `json:"updated_at"`
SignedAt time.Time `json:"signed_at"`
ExpiresAt time.Time `json:"expires_at"`
}
type AuthorityRequest ¶
type AuthorityRequest struct {
Name string `json:"name"`
Organization string `json:"organization"`
Domain string `json:"domain"`
RootValidDays int `json:"root_valid_days"`
DefaultValidDays int `json:"default_valid_days"`
MaxValidDays int `json:"max_valid_days"`
Agent string `json:"agent"`
Owner string `json:"owner"`
Install bool `json:"install"`
}
type AuthorityResponse ¶
type AuthorityResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Organization string `json:"organization"`
Domain string `json:"domain"`
RootValidDays int `json:"root_valid_days"`
DefaultValidDays int `json:"default_valid_days"`
MaxValidDays int `json:"max_valid_days"`
Agent types.ServerSummary `json:"agent"`
Owner types.UserSummary `json:"owner"`
UpdatedAt time.Time `json:"updated_at"`
SignedAt time.Time `json:"signed_at"`
ExpiresAt time.Time `json:"expires_at"`
}
type AuthoritySummary ¶ added in v0.4.4
type AuthoritySummary struct {
ID string `json:"id"`
Name string `json:"name"`
Owner types.UserSummary `json:"owner"`
}
type CRLResponse ¶ added in v1.2.0
type CSRAttributes ¶
type CSRAttributes struct {
ID string `json:"id" table:"ID"`
Name string `json:"name"` // Derived from the first domain in the CSR domain list
Authority string `json:"authority"`
DomainList []string `json:"domain_list" table:"Domain List"`
IpList []string `json:"ip_list" table:"IP List"`
Status string `json:"status"`
RequestedIp string `json:"requested_ip" table:"Requested IP"`
RequestedBy string `json:"requested_by" table:"Requested By"`
RequestedDate string `json:"requested_date" table:"Requested Date"`
}
func GetCSRList ¶
func GetCSRList(ac *client.AlpaconClient, status string) ([]CSRAttributes, error)
type CSRResponse ¶
type CSRResponse struct {
ID string `json:"id"`
Authority AuthoritySummary `json:"authority"`
CommonName string `json:"common_name"`
DomainList []string `json:"domain_list"`
IpList []string `json:"ip_list"`
ValidDays int `json:"valid_days"`
Status string `json:"status"`
RequestedIp string `json:"requested_ip"`
RequestedBy types.UserSummary `json:"requested_by"`
AddedAt time.Time `json:"added_at"`
}
type Certificate ¶
type Certificate struct {
ID string `json:"id"`
Authority AuthoritySummary `json:"authority"`
Csr string `json:"csr"`
CrtText string `json:"crt_text"`
CommonName string `json:"common_name"`
SerialNumber string `json:"serial_number"`
ValidDays int `json:"valid_days"`
Status string `json:"status"`
IsRevoked bool `json:"is_revoked"`
RevokedAt *time.Time `json:"revoked_at"`
CanRevoke bool `json:"can_revoke"`
SignedAt time.Time `json:"signed_at"`
ExpiresAt time.Time `json:"expires_at"`
SignedBy string `json:"signed_by"`
RenewedBy string `json:"renewed_by"`
}
type CertificateAttributes ¶
type CertificateAttributes struct {
ID string `json:"id" table:"ID"`
Authority string `json:"authority"`
Csr string `json:"csr" table:"CSR"`
ValidDays int `json:"valid_days" table:"Valid Days"`
SignedAt string `json:"signed_at" table:"Signed At"`
ExpiresAt string `json:"expires_at" table:"Expires At"`
SignedBy string `json:"signed_by" table:"Signed By"`
RenewedBy string `json:"renewed_by" table:"Renewed By"`
}
func GetCertificateList ¶
func GetCertificateList(ac *client.AlpaconClient) ([]CertificateAttributes, error)
type RevokeRequestAttributes ¶ added in v1.2.0
type RevokeRequestAttributes struct {
ID string `json:"id" table:"ID"`
CommonName string `json:"common_name" table:"Common Name"`
Authority string `json:"authority"`
SerialNumber string `json:"serial_number" table:"Serial Number"`
Status string `json:"status"`
RequestedBy string `json:"requested_by" table:"Requested By"`
AddedAt string `json:"added_at" table:"Added At"`
}
func GetRevokeRequestList ¶ added in v1.2.0
func GetRevokeRequestList(ac *client.AlpaconClient, status string, certificate string) ([]RevokeRequestAttributes, error)
type RevokeRequestCreate ¶ added in v1.2.0
type RevokeRequestResponse ¶ added in v1.2.0
type RevokeRequestResponse struct {
ID string `json:"id"`
Certificate string `json:"certificate"`
Authority AuthoritySummary `json:"authority"`
CommonName string `json:"common_name"`
SerialNumber string `json:"serial_number"`
Reason int `json:"reason"`
Status string `json:"status"`
RequestedReason string `json:"requested_reason"`
RequestedBy types.UserSummary `json:"requested_by"`
ApprovedBy *types.UserSummary `json:"approved_by"`
DeniedBy *types.UserSummary `json:"denied_by"`
AddedAt time.Time `json:"added_at"`
ErrorMessage string `json:"error_message"`
HandledAt *time.Time `json:"handled_at"`
}
func CreateRevokeRequest ¶ added in v1.2.0
func CreateRevokeRequest(ac *client.AlpaconClient, request RevokeRequestCreate) (RevokeRequestResponse, error)
type SignRequest ¶
type SignRequestDetail ¶ added in v1.0.0
type SignRequestResponse ¶
type SignRequestResponse struct {
ID string `json:"id"`
Organization string `json:"organization"`
CommonName string `json:"common_name"`
DomainList []string `json:"domain_list"`
IpList []string `json:"ip_list"`
ValidDays int `json:"valid_days"`
Status string `json:"status"`
RequestedIp string `json:"requested_ip"`
RequestedBy types.UserSummary `json:"requested_by"`
SubmitURL string `json:"submit_url"`
}
func CreateSignRequest ¶
func CreateSignRequest(ac *client.AlpaconClient, signRequest SignRequest) (SignRequestResponse, error)
Click to show internal directories.
Click to hide internal directories.