certificates

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 9 Imported by: 3 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type CertificateResource

type CertificateResource struct {
	Archived                 string                      `json:"Archived,omitempty"`
	CertificateData          *core.SensitiveValue        `json:"CertificateData,omitempty" validate:"required"`
	CertificateDataFormat    string                      `json:"CertificateDataFormat,omitempty"`
	EnvironmentIDs           []string                    `json:"EnvironmentIds,omitempty"`
	HasPrivateKey            bool                        `json:"HasPrivateKey,omitempty"`
	IsExpired                bool                        `json:"IsExpired,omitempty"`
	IssuerCommonName         string                      `json:"IssuerCommonName,omitempty"`
	IssuerDistinguishedName  string                      `json:"IssuerDistinguishedName,omitempty"`
	IssuerOrganization       string                      `json:"IssuerOrganization,omitempty"`
	Name                     string                      `json:"Name,omitempty" validate:"required"`
	NotAfter                 string                      `json:"NotAfter,omitempty"`
	NotBefore                string                      `json:"NotBefore,omitempty"`
	Notes                    string                      `json:"Notes,omitempty"`
	Password                 *core.SensitiveValue        `json:"Password,omitempty"`
	ReplacedBy               string                      `json:"ReplacedBy,omitempty"`
	SelfSigned               bool                        `json:"SelfSigned,omitempty"`
	SerialNumber             string                      `json:"SerialNumber,omitempty"`
	SignatureAlgorithmName   string                      `json:"SignatureAlgorithmName,omitempty"`
	SubjectAlternativeNames  []string                    `json:"SubjectAlternativeNames,omitempty"`
	SubjectCommonName        string                      `json:"SubjectCommonName,omitempty"`
	SubjectDistinguishedName string                      `json:"SubjectDistinguishedName,omitempty"`
	SubjectOrganization      string                      `json:"SubjectOrganization,omitempty"`
	TenantedDeploymentMode   core.TenantedDeploymentMode `json:"TenantedDeploymentParticipation"`
	TenantIDs                []string                    `json:"TenantIds,omitempty"`
	TenantTags               []string                    `json:"TenantTags,omitempty"`
	Thumbprint               string                      `json:"Thumbprint,omitempty"`
	Version                  int                         `json:"Version,omitempty"`

	resources.Resource
}

func NewCertificateResource

func NewCertificateResource(name string, certificateData *core.SensitiveValue, password *core.SensitiveValue) *CertificateResource

NewCertificateResource initializes a certificate resource with a name and credentials.

func (CertificateResource) Validate

func (c CertificateResource) Validate() error

Validate checks the state of the certificate resource and returns an error if invalid.

type CertificateService

type CertificateService struct {
	services.CanDeleteService
}

certificateService handles communication with Certificate-related methods of the Octopus API.

func NewCertificateService

func NewCertificateService(sling *sling.Sling, uriTemplate string) *CertificateService

NewCertificateService returns an certificateService with a preconfigured client.

func (*CertificateService) Add

Add creates a new certificate.

func (*CertificateService) Archive

Archive sets the status of a certificate to an archived state.

func (*CertificateService) Get

Get returns a collection of certificates based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.

func (*CertificateService) GetAll

func (s *CertificateService) GetAll() ([]*CertificateResource, error)

GetAll returns all certificates. If none are found or an error occurs, it returns an empty collection.

func (*CertificateService) GetByID

GetByID returns the certificate that matches the input ID. If one cannot be found, it returns nil and an error.

func (*CertificateService) Replace

func (s *CertificateService) Replace(certificateID string, replacementCertificate *ReplacementCertificate) (*CertificateResource, error)

func (*CertificateService) Unarchive

Unarchive resets the status of an archived certificate.

func (*CertificateService) Update

Update modifies a Certificate based on the one provided as input.

type CertificatesQuery

type CertificatesQuery struct {
	Archived    string   `uri:"archived,omitempty" url:"archived,omitempty"`
	FirstResult string   `uri:"firstResult,omitempty" url:"firstResult,omitempty"`
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	OrderBy     string   `uri:"orderBy,omitempty" url:"orderBy,omitempty"`
	PartialName string   `uri:"partialName,omitempty" url:"partialName,omitempty"`
	Search      string   `uri:"search,omitempty" url:"search,omitempty"`
	Skip        int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take        int      `uri:"take,omitempty" url:"take,omitempty"`
	Tenant      string   `uri:"tenant,omitempty" url:"tenant,omitempty"`
}

type ReplacementCertificate

type ReplacementCertificate struct {
	CertificateData string `json:"CertificateData,omitempty"`
	Password        string `json:"Password,omitempty"`
}

func NewReplacementCertificate

func NewReplacementCertificate(certificateData string, password string) *ReplacementCertificate

Jump to

Keyboard shortcuts

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