api

package
v0.0.0-...-a91455d Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	ECert bool   `json:"ecert,omitempty"`
}

Attribute is a name and value pair

func (*Attribute) GetName

func (a *Attribute) GetName() string

GetName returns the name of the attribute

func (*Attribute) GetValue

func (a *Attribute) GetValue() string

GetValue returns the value of the attribute

type AttributeRequest

type AttributeRequest struct {
	Name     string `json:"name"`
	Optional bool   `json:"optional,omitempty"`
}

AttributeRequest is a request for an attribute.

func (*AttributeRequest) GetName

func (ar *AttributeRequest) GetName() string

GetName returns the name of an attribute being requested

func (*AttributeRequest) IsRequired

func (ar *AttributeRequest) IsRequired() bool

IsRequired returns true if the attribute being requested is required

type BasicKeyRequest

type BasicKeyRequest struct {
	Algo string `json:"algo" yaml:"algo" help:"Specify key algorithm"`
	Size int    `json:"size" yaml:"size" help:"Specify key size"`
}

BasicKeyRequest encapsulates size and algorithm for the key to be generated

func NewBasicKeyRequest

func NewBasicKeyRequest() *BasicKeyRequest

NewBasicKeyRequest returns the BasicKeyRequest object that is constructed from the object returned by the csr.NewBasicKeyRequest() function

type CAInfoResponseNet

type CAInfoResponseNet struct {
	CAName  string
	CAChain string
	Version string
}

CAInfoResponseNet is the response to the GET /info request

type CSRInfo

type CSRInfo struct {
	CN           string           `json:"CN"`
	Names        []csr.Name       `json:"names,omitempty"`
	Hosts        []string         `json:"hosts,omitempty"`
	KeyRequest   *BasicKeyRequest `json:"key,omitempty"`
	CA           *csr.CAConfig    `json:"ca,omitempty" hide:"true"`
	SerialNumber string           `json:"serial_number,omitempty"`
}

CSRInfo is Certificate Signing Request (CSR) Information

type EnrollmentRequest

type EnrollmentRequest struct {
	Name     string              `json:"name"`
	Secret   string              `json:"secret,omitempty"`
	CAName   string              `json:"caname,omitempty"`
	AttrReqs []*AttributeRequest `json:"attr_reqs,omitempty"`
	Profile  string              `json:"profile,omitempty"`
	CSR      *CSRInfo            `json:"csr,omitempty"`
}

EnrollmentRequest is a request to enroll an identity

type EnrollmentRequestNet

type EnrollmentRequestNet struct {
	signer.SignRequest
	CAName   string
	AttrReqs []*AttributeRequest `json:"attr_reqs,omitempty"`
}

EnrollmentRequestNet is a request to enroll an identity

type EnrollmentResponse

type EnrollmentResponse struct {
	Identity credential.Identity
	CAInfo   GetCAInfoResponse
}

EnrollmentResponse is the response from Client.Enroll and Identity.Reenroll

type EnrollmentResponseNet

type EnrollmentResponseNet struct {
	Cert       string
	ServerInfo CAInfoResponseNet
}

EnrollmentResponseNet is the response to the /enroll request

type GetCAInfoResponse

type GetCAInfoResponse struct {
	// CAName is the name of the CA
	CAName string
	// CAChain is the PEM-encoded bytes of the rksync-ca server's CA chain.
	CAChain []byte
	// Version of the server
	Version string
}

GetCAInfoResponse is the response from the GetCAInfo call

type RegistrationRequest

type RegistrationRequest struct {
	Name           string      `json:"id"`
	Secret         string      `json:"secret,omitempty"`
	MaxEnrollments int         `json:"max_enrollments,omitempty"`
	Attributes     []Attribute `json:"attrs,omitempty"`
	CAName         string      `json:"caname,omitempty"`
}

RegistrationRequest for a new identity

type RegistrationRequestNet

type RegistrationRequestNet struct {
	RegistrationRequest
}

RegistrationRequestNet is the registration request for a new identity

type RegistrationResponse

type RegistrationResponse struct {
	Secret string `json:"secret"`
}

RegistrationResponse is a registration response

type RegistrationResponseNet

type RegistrationResponseNet struct {
	RegistrationResponse
}

RegistrationResponseNet is a registration response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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