Documentation ¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
api.proto primitives.proto
It has these top-level messages:
Empty Id Serial Entity Configuration CSR Certificate
Index ¶
- Variables
- func RegisterCybercomServer(s *grpc.Server, srv CybercomServer)
- type CSR
- func (c *CSR) CertificateRequest() (*x509.CertificateRequest, error)
- func (*CSR) Descriptor() ([]byte, []int)
- func (c CSR) Empty() bool
- func (m *CSR) GetDer() []byte
- func (c *CSR) Hash() ([]byte, error)
- func (c *CSR) Id() (*Id, error)
- func (*CSR) ProtoMessage()
- func (m *CSR) Reset()
- func (m *CSR) String() string
- func (c *CSR) StringHash() (string, error)
- type Certificate
- func (c *Certificate) Certificate() (*x509.Certificate, error)
- func (*Certificate) Descriptor() ([]byte, []int)
- func (c Certificate) Empty() bool
- func (m *Certificate) GetDer() []byte
- func (c *Certificate) Hash() ([]byte, error)
- func (c *Certificate) Id() (*Id, error)
- func (*Certificate) ProtoMessage()
- func (m *Certificate) Reset()
- func (m *Certificate) String() string
- type Configuration
- func (*Configuration) Descriptor() ([]byte, []int)
- func (m *Configuration) GetCa() []*Certificate
- func (m *Configuration) GetEntity() *Entity
- func (m *Configuration) GetName() string
- func (m *Configuration) GetPeer() *Certificate
- func (m *Configuration) GetRequestTemplate() *Configuration_RequestTemplate
- func (*Configuration) ProtoMessage()
- func (m *Configuration) Reset()
- func (m *Configuration) String() string
- type Configuration_RequestTemplate
- func (*Configuration_RequestTemplate) Descriptor() ([]byte, []int)
- func (m *Configuration_RequestTemplate) GetCountry() string
- func (m *Configuration_RequestTemplate) GetLocality() string
- func (m *Configuration_RequestTemplate) GetOrganization() string
- func (m *Configuration_RequestTemplate) GetOrganizationalUnit() string
- func (m *Configuration_RequestTemplate) GetProvince() string
- func (*Configuration_RequestTemplate) ProtoMessage()
- func (m *Configuration_RequestTemplate) Reset()
- func (m *Configuration_RequestTemplate) String() string
- type CybercomClient
- type CybercomServer
- type Cybercom_GetCertificatesClient
- type Cybercom_GetCertificatesServer
- type Cybercom_GetEntitiesClient
- type Cybercom_GetEntitiesServer
- type Empty
- type Entity
- func (*Entity) Descriptor() ([]byte, []int)
- func (m *Entity) GetCsr() *CSR
- func (m *Entity) GetEmail() string
- func (m *Entity) GetExpires() uint64
- func (m *Entity) GetId() *Id
- func (m *Entity) GetLongevity() string
- func (m *Entity) GetState() Entity_State
- func (*Entity) ProtoMessage()
- func (m *Entity) Reset()
- func (m *Entity) String() string
- func (e *Entity) Validate() error
- type Entity_State
- type Id
- type Serial
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EmptyCertificate = Certificate{Der: []byte{}} EmptyCSR = CSR{Der: []byte{}} )
View Source
var Entity_State_name = map[int32]string{
0: "UNKNOWN",
1: "PENDING",
2: "APPROVED",
3: "REJECTED",
4: "REVOKED",
5: "ONEOFF",
}
View Source
var Entity_State_value = map[string]int32{
"UNKNOWN": 0,
"PENDING": 1,
"APPROVED": 2,
"REJECTED": 3,
"REVOKED": 4,
"ONEOFF": 5,
}
Functions ¶
func RegisterCybercomServer ¶
func RegisterCybercomServer(s *grpc.Server, srv CybercomServer)
Types ¶
type CSR ¶
type CSR struct {
Der []byte `protobuf:"bytes,1,opt,name=der,proto3" json:"der,omitempty"`
}
func NewCertificateRequest ¶
func NewCertificateRequest(csr x509.CertificateRequest) CSR
func (*CSR) CertificateRequest ¶
func (c *CSR) CertificateRequest() (*x509.CertificateRequest, error)
func (*CSR) Descriptor ¶
func (*CSR) ProtoMessage ¶
func (*CSR) ProtoMessage()
func (*CSR) StringHash ¶
type Certificate ¶
type Certificate struct {
Der []byte `protobuf:"bytes,1,opt,name=der,proto3" json:"der,omitempty"`
}
func NewCertificate ¶
func NewCertificate(cert x509.Certificate) Certificate
func (*Certificate) Certificate ¶
func (c *Certificate) Certificate() (*x509.Certificate, error)
func (*Certificate) Descriptor ¶
func (*Certificate) Descriptor() ([]byte, []int)
func (Certificate) Empty ¶
func (c Certificate) Empty() bool
func (*Certificate) GetDer ¶
func (m *Certificate) GetDer() []byte
func (*Certificate) Hash ¶
func (c *Certificate) Hash() ([]byte, error)
func (*Certificate) Id ¶
func (c *Certificate) Id() (*Id, error)
func (*Certificate) ProtoMessage ¶
func (*Certificate) ProtoMessage()
func (*Certificate) Reset ¶
func (m *Certificate) Reset()
func (*Certificate) String ¶
func (m *Certificate) String() string
type Configuration ¶
type Configuration struct { // something like "Paul's Home CA" or "StrexCorp Synernists, Inc." Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Default template to use for clients that don't know any better // than this. It's assumed a user is a part of the CYBERCOM server that // belongs (or holds a role) to an organization. As such, we can inheret // their configuration. RequestTemplate *Configuration_RequestTemplate `protobuf:"bytes,2,opt,name=request_template,json=requestTemplate" json:"request_template,omitempty"` // the set of CAs we should know about. Natch, we already need the CA // this server was signed with in order to get his pool, but this could // be great for getting the full set of operational CAs we know about. Ca []*Certificate `protobuf:"bytes,3,rep,name=ca" json:"ca,omitempty"` // Get the client's certificate back if provided Peer *Certificate `protobuf:"bytes,4,opt,name=peer" json:"peer,omitempty"` // Get the client's entiy entry if provided Entity *Entity `protobuf:"bytes,5,opt,name=entity" json:"entity,omitempty"` }
func (*Configuration) Descriptor ¶
func (*Configuration) Descriptor() ([]byte, []int)
func (*Configuration) GetCa ¶
func (m *Configuration) GetCa() []*Certificate
func (*Configuration) GetEntity ¶
func (m *Configuration) GetEntity() *Entity
func (*Configuration) GetName ¶
func (m *Configuration) GetName() string
func (*Configuration) GetPeer ¶
func (m *Configuration) GetPeer() *Certificate
func (*Configuration) GetRequestTemplate ¶
func (m *Configuration) GetRequestTemplate() *Configuration_RequestTemplate
func (*Configuration) ProtoMessage ¶
func (*Configuration) ProtoMessage()
func (*Configuration) Reset ¶
func (m *Configuration) Reset()
func (*Configuration) String ¶
func (m *Configuration) String() string
type Configuration_RequestTemplate ¶
type Configuration_RequestTemplate struct { Country string `protobuf:"bytes,1,opt,name=country" json:"country,omitempty"` Organization string `protobuf:"bytes,2,opt,name=organization" json:"organization,omitempty"` OrganizationalUnit string `protobuf:"bytes,3,opt,name=organizational_unit,json=organizationalUnit" json:"organizational_unit,omitempty"` Locality string `protobuf:"bytes,4,opt,name=locality" json:"locality,omitempty"` Province string `protobuf:"bytes,5,opt,name=province" json:"province,omitempty"` }
func (*Configuration_RequestTemplate) Descriptor ¶
func (*Configuration_RequestTemplate) Descriptor() ([]byte, []int)
func (*Configuration_RequestTemplate) GetCountry ¶
func (m *Configuration_RequestTemplate) GetCountry() string
func (*Configuration_RequestTemplate) GetLocality ¶
func (m *Configuration_RequestTemplate) GetLocality() string
func (*Configuration_RequestTemplate) GetOrganization ¶
func (m *Configuration_RequestTemplate) GetOrganization() string
func (*Configuration_RequestTemplate) GetOrganizationalUnit ¶
func (m *Configuration_RequestTemplate) GetOrganizationalUnit() string
func (*Configuration_RequestTemplate) GetProvince ¶
func (m *Configuration_RequestTemplate) GetProvince() string
func (*Configuration_RequestTemplate) ProtoMessage ¶
func (*Configuration_RequestTemplate) ProtoMessage()
func (*Configuration_RequestTemplate) Reset ¶
func (m *Configuration_RequestTemplate) Reset()
func (*Configuration_RequestTemplate) String ¶
func (m *Configuration_RequestTemplate) String() string
type CybercomClient ¶
type CybercomClient interface { // Get a Cybercom configuration GetConfiguration(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Configuration, error) // Submimt a CSR for processing later, returning the Entity ID // that the management layer will use as well. Register(ctx context.Context, in *CSR, opts ...grpc.CallOption) (*Entity, error) // Get an entity and their information based on their Entity ID GetEntity(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Entity, error) // Given an Entity ID, return a stream of Certificates which have // been issued to that client. GetCertificates(ctx context.Context, in *Id, opts ...grpc.CallOption) (Cybercom_GetCertificatesClient, error) // Given an Entity ID, return the current Certificate for the // user. GetCertificate(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Certificate, error) // Given a Serial, return the Certifciate that was issued GetCertificateBySerial(ctx context.Context, in *Serial, opts ...grpc.CallOption) (*Certificate, error) // Get the Entity for the given Certificate by its Serial GetEntityBySerial(ctx context.Context, in *Serial, opts ...grpc.CallOption) (*Entity, error) // Get a new Certificate for the client on the other end of the TLS // connection. If a Certificate is valid, and the Entity is valid, this // will trigger a new Certificate to be issued. Renew(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Certificate, error) // Get all entities known to the system. GetEntities(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Cybercom_GetEntitiesClient, error) // Issue Certificate for an Entity. IssueCertificate(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Certificate, error) SetEntityState(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) SetEntityLongevity(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) SetEntityExpiry(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Entity, error) }
func NewCybercomClient ¶
func NewCybercomClient(cc *grpc.ClientConn) CybercomClient
type CybercomServer ¶
type CybercomServer interface { // Get a Cybercom configuration GetConfiguration(context.Context, *Empty) (*Configuration, error) // Submimt a CSR for processing later, returning the Entity ID // that the management layer will use as well. Register(context.Context, *CSR) (*Entity, error) // Get an entity and their information based on their Entity ID GetEntity(context.Context, *Id) (*Entity, error) // Given an Entity ID, return a stream of Certificates which have // been issued to that client. GetCertificates(*Id, Cybercom_GetCertificatesServer) error // Given an Entity ID, return the current Certificate for the // user. GetCertificate(context.Context, *Id) (*Certificate, error) // Given a Serial, return the Certifciate that was issued GetCertificateBySerial(context.Context, *Serial) (*Certificate, error) // Get the Entity for the given Certificate by its Serial GetEntityBySerial(context.Context, *Serial) (*Entity, error) // Get a new Certificate for the client on the other end of the TLS // connection. If a Certificate is valid, and the Entity is valid, this // will trigger a new Certificate to be issued. Renew(context.Context, *Empty) (*Certificate, error) // Get all entities known to the system. GetEntities(*Empty, Cybercom_GetEntitiesServer) error // Issue Certificate for an Entity. IssueCertificate(context.Context, *Id) (*Certificate, error) SetEntityState(context.Context, *Entity) (*Entity, error) SetEntityLongevity(context.Context, *Entity) (*Entity, error) SetEntityExpiry(context.Context, *Entity) (*Entity, error) }
type Cybercom_GetCertificatesClient ¶
type Cybercom_GetCertificatesClient interface { Recv() (*Certificate, error) grpc.ClientStream }
type Cybercom_GetCertificatesServer ¶
type Cybercom_GetCertificatesServer interface { Send(*Certificate) error grpc.ServerStream }
type Cybercom_GetEntitiesClient ¶
type Cybercom_GetEntitiesClient interface { Recv() (*Entity, error) grpc.ClientStream }
type Cybercom_GetEntitiesServer ¶
type Cybercom_GetEntitiesServer interface { Send(*Entity) error grpc.ServerStream }
type Empty ¶
type Empty struct { }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type Entity ¶
type Entity struct { Id *Id `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` State Entity_State `protobuf:"varint,2,opt,name=state,enum=cybercom.Entity_State" json:"state,omitempty"` Csr *CSR `protobuf:"bytes,3,opt,name=csr" json:"csr,omitempty"` Email string `protobuf:"bytes,4,opt,name=email" json:"email,omitempty"` Longevity string `protobuf:"bytes,5,opt,name=longevity" json:"longevity,omitempty"` Expires uint64 `protobuf:"varint,6,opt,name=expires" json:"expires,omitempty"` }
func (*Entity) Descriptor ¶
func (*Entity) GetExpires ¶
func (*Entity) GetLongevity ¶
func (*Entity) GetState ¶
func (m *Entity) GetState() Entity_State
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
type Entity_State ¶
type Entity_State int32
const ( Entity_UNKNOWN Entity_State = 0 Entity_PENDING Entity_State = 1 Entity_APPROVED Entity_State = 2 Entity_REJECTED Entity_State = 3 Entity_REVOKED Entity_State = 4 Entity_ONEOFF Entity_State = 5 )
func (Entity_State) EnumDescriptor ¶
func (Entity_State) EnumDescriptor() ([]byte, []int)
func (Entity_State) String ¶
func (x Entity_State) String() string
type Id ¶
type Id struct {
Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (*Id) Descriptor ¶
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
type Serial ¶
type Serial struct {
Serial []byte `protobuf:"bytes,1,opt,name=serial,proto3" json:"serial,omitempty"`
}
func (*Serial) Descriptor ¶
func (*Serial) ProtoMessage ¶
func (*Serial) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.