Documentation ¶
Overview ¶
Package protected_objects is a generated protocol buffer package.
It is generated from these files:
protected_objects.proto
It has these top-level messages:
ObjectIdMessage ObjectMessage NodeMessage ProtectedObjectMessage ObjectStoreMessage NodeStoreMessage ProtectedObjectStoreMessage
Index ¶
- func AddObject(l *list.List, obj ObjectMessage) error
- func AddObjectId(l *list.List, obj ObjectIdMessage) error
- func AddProtectedObject(l *list.List, obj ProtectedObjectMessage) error
- func ConstructProtectorChain(obj_list *list.List, nameProtector string, epochProtector int32, ...) (*list.List, error)
- func ConstructProtectorChainFromBase(obj_list *list.List, nameProtected string, epochProtected int32, ...) (*list.List, error)
- func DeleteObject(l *list.List, name string, epoch int32) error
- func DeleteProtectedObject(l *list.List, name string, epoch int32) error
- func FindElementById(l *list.List, name string, epoch int32) *list.Element
- func FindProtectedObjects(l *list.List, name string, epoch int32) *list.List
- func FindProtectorObjects(l *list.List, name string, epoch int32) *list.List
- func IsValid(obj ObjectMessage, statuses []string, types []string) bool
- func LoadObjects(file string) *list.List
- func LoadProtectedObjects(file string) *list.List
- func PrintObject(obj *ObjectMessage)
- func PrintProtectedObject(obj *ProtectedObjectMessage)
- func SaveObjects(l *list.List, file string) error
- func SaveProtectedObjects(l *list.List, file string) error
- type NodeMessage
- type NodeStoreMessage
- type ObjectIdMessage
- type ObjectMessage
- func CreateObject(name string, epoch int32, obj_type *string, status *string, ...) (*ObjectMessage, error)
- func FindObject(l *list.List, name string, epoch int32, types []string, statuses []string) *ObjectMessage
- func GetEarliestEpoch(l *list.List, name string, status []string) *ObjectMessage
- func GetLatestEpoch(l *list.List, name string, status []string) *ObjectMessage
- func RecoverProtectedObject(obj *ProtectedObjectMessage, protectorKeys []byte) (*ObjectMessage, error)
- func (*ObjectMessage) Descriptor() ([]byte, []int)
- func (m *ObjectMessage) GetNotAfter() string
- func (m *ObjectMessage) GetNotBefore() string
- func (m *ObjectMessage) GetObjId() *ObjectIdMessage
- func (m *ObjectMessage) GetObjStatus() string
- func (m *ObjectMessage) GetObjType() string
- func (m *ObjectMessage) GetObjVal() []byte
- func (*ObjectMessage) ProtoMessage()
- func (m *ObjectMessage) Reset()
- func (m *ObjectMessage) String() string
- type ObjectStoreMessage
- type ProtectedObjectMessage
- func (*ProtectedObjectMessage) Descriptor() ([]byte, []int)
- func (m *ProtectedObjectMessage) GetBlob() []byte
- func (m *ProtectedObjectMessage) GetProtectedObjId() *ObjectIdMessage
- func (m *ProtectedObjectMessage) GetProtectorObjId() *ObjectIdMessage
- func (*ProtectedObjectMessage) ProtoMessage()
- func (m *ProtectedObjectMessage) Reset()
- func (m *ProtectedObjectMessage) String() string
- type ProtectedObjectStoreMessage
- func (*ProtectedObjectStoreMessage) Descriptor() ([]byte, []int)
- func (m *ProtectedObjectStoreMessage) GetProtectedObjects() []*ProtectedObjectMessage
- func (*ProtectedObjectStoreMessage) ProtoMessage()
- func (m *ProtectedObjectStoreMessage) Reset()
- func (m *ProtectedObjectStoreMessage) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddObject ¶
func AddObject(l *list.List, obj ObjectMessage) error
Add the indicated protected object to the list.
func AddObjectId ¶
func AddObjectId(l *list.List, obj ObjectIdMessage) error
Add the indicated objectid to the list.
func AddProtectedObject ¶
func AddProtectedObject(l *list.List, obj ProtectedObjectMessage) error
Add the indicated protected object to the list.
func ConstructProtectorChain ¶
func ConstructProtectorChain(obj_list *list.List, nameProtector string, epochProtector int32, nameTop *string, epochTop *int32, statuses []string, types []string, seen_list *list.List, protected_object_list *list.List) (*list.List, error)
Construct chain of protector objects for (nameProtector, epochProtector) Stops when there are no protectors for top object
func ConstructProtectorChainFromBase ¶
func ConstructProtectorChainFromBase(obj_list *list.List, nameProtected string, epochProtected int32, statuses []string, types []string, base_list *list.List, seen_list *list.List, protected_object_list *list.List) (*list.List, error)
Construct chain of protector objects for (nameProtected, epochProtected)
Chain must terminate with an object from the base list
func DeleteObject ¶
Remove the referenced object from the list.
func DeleteProtectedObject ¶
Remove the referenced protected object from the list.
func FindProtectedObjects ¶
Find objects protected by object with given name and epoch.
func FindProtectorObjects ¶
Find protectors of the object with given name and epoch.
func IsValid ¶
func IsValid(obj ObjectMessage, statuses []string, types []string) bool
Is object the right type, have the right status and in it's validity period?
func LoadProtectedObjects ¶
Read and unmarshal an protected object file.
func PrintObject ¶
func PrintObject(obj *ObjectMessage)
func PrintProtectedObject ¶
func PrintProtectedObject(obj *ProtectedObjectMessage)
func SaveObjects ¶
Marshal objects and save them in a file. nil is error return
Types ¶
type NodeMessage ¶
type NodeMessage struct { ProtectedObjId *ObjectIdMessage `protobuf:"bytes,1,req,name=protected_obj_id" json:"protected_obj_id,omitempty"` ProtectorObjId *ObjectIdMessage `protobuf:"bytes,2,opt,name=protector_obj_id" json:"protector_obj_id,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*NodeMessage) Descriptor ¶
func (*NodeMessage) Descriptor() ([]byte, []int)
func (*NodeMessage) GetProtectedObjId ¶
func (m *NodeMessage) GetProtectedObjId() *ObjectIdMessage
func (*NodeMessage) GetProtectorObjId ¶
func (m *NodeMessage) GetProtectorObjId() *ObjectIdMessage
func (*NodeMessage) ProtoMessage ¶
func (*NodeMessage) ProtoMessage()
func (*NodeMessage) Reset ¶
func (m *NodeMessage) Reset()
func (*NodeMessage) String ¶
func (m *NodeMessage) String() string
type NodeStoreMessage ¶
type NodeStoreMessage struct { NodeObjects []*NodeMessage `protobuf:"bytes,1,rep,name=node_objects" json:"node_objects,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*NodeStoreMessage) Descriptor ¶
func (*NodeStoreMessage) Descriptor() ([]byte, []int)
func (*NodeStoreMessage) GetNodeObjects ¶
func (m *NodeStoreMessage) GetNodeObjects() []*NodeMessage
func (*NodeStoreMessage) ProtoMessage ¶
func (*NodeStoreMessage) ProtoMessage()
func (*NodeStoreMessage) Reset ¶
func (m *NodeStoreMessage) Reset()
func (*NodeStoreMessage) String ¶
func (m *NodeStoreMessage) String() string
type ObjectIdMessage ¶
type ObjectIdMessage struct { ObjName *string `protobuf:"bytes,1,req,name=obj_name" json:"obj_name,omitempty"` ObjEpoch *int32 `protobuf:"varint,2,opt,name=obj_epoch" json:"obj_epoch,omitempty"` XXX_unrecognized []byte `json:"-"` }
Epochs must increase monotonically and be > 0
func (*ObjectIdMessage) Descriptor ¶
func (*ObjectIdMessage) Descriptor() ([]byte, []int)
func (*ObjectIdMessage) GetObjEpoch ¶
func (m *ObjectIdMessage) GetObjEpoch() int32
func (*ObjectIdMessage) GetObjName ¶
func (m *ObjectIdMessage) GetObjName() string
func (*ObjectIdMessage) ProtoMessage ¶
func (*ObjectIdMessage) ProtoMessage()
func (*ObjectIdMessage) Reset ¶
func (m *ObjectIdMessage) Reset()
func (*ObjectIdMessage) String ¶
func (m *ObjectIdMessage) String() string
type ObjectMessage ¶
type ObjectMessage struct { ObjId *ObjectIdMessage `protobuf:"bytes,1,req,name=obj_id" json:"obj_id,omitempty"` ObjType *string `protobuf:"bytes,2,opt,name=obj_type" json:"obj_type,omitempty"` ObjStatus *string `protobuf:"bytes,3,opt,name=obj_status" json:"obj_status,omitempty"` NotBefore *string `protobuf:"bytes,4,opt,name=not_before" json:"not_before,omitempty"` NotAfter *string `protobuf:"bytes,5,opt,name=not_after" json:"not_after,omitempty"` ObjVal []byte `protobuf:"bytes,6,opt,name=obj_val" json:"obj_val,omitempty"` XXX_unrecognized []byte `json:"-"` }
Standard statuses are: active, retired, inactive, revoked Standard types are: file, key, key-aes128-ctr-hmacsha256 NotBefore and notAfter are string with the standard
string format: 2006-01-02 15:04:05.999999999 -0700 MST
func CreateObject ¶
func CreateObject(name string, epoch int32, obj_type *string, status *string, notBefore *time.Time, notAfter *time.Time, v []byte) (*ObjectMessage, error)
Create the object with the provided data.
func FindObject ¶
func FindObject(l *list.List, name string, epoch int32, types []string, statuses []string) *ObjectMessage
Find object with given name, epoch, with one of the offered types and names. A nil types or names list matches anything (even nil)
func GetEarliestEpoch ¶
func GetEarliestEpoch(l *list.List, name string, status []string) *ObjectMessage
Get object with given name and earliest epoch.
func GetLatestEpoch ¶
func GetLatestEpoch(l *list.List, name string, status []string) *ObjectMessage
Get object with given name and latest epoch.
func RecoverProtectedObject ¶
func RecoverProtectedObject(obj *ProtectedObjectMessage, protectorKeys []byte) (*ObjectMessage, error)
Decrypt and unmarshal a protected object blob
func (*ObjectMessage) Descriptor ¶
func (*ObjectMessage) Descriptor() ([]byte, []int)
func (*ObjectMessage) GetNotAfter ¶
func (m *ObjectMessage) GetNotAfter() string
func (*ObjectMessage) GetNotBefore ¶
func (m *ObjectMessage) GetNotBefore() string
func (*ObjectMessage) GetObjId ¶
func (m *ObjectMessage) GetObjId() *ObjectIdMessage
func (*ObjectMessage) GetObjStatus ¶
func (m *ObjectMessage) GetObjStatus() string
func (*ObjectMessage) GetObjType ¶
func (m *ObjectMessage) GetObjType() string
func (*ObjectMessage) GetObjVal ¶
func (m *ObjectMessage) GetObjVal() []byte
func (*ObjectMessage) ProtoMessage ¶
func (*ObjectMessage) ProtoMessage()
func (*ObjectMessage) Reset ¶
func (m *ObjectMessage) Reset()
func (*ObjectMessage) String ¶
func (m *ObjectMessage) String() string
type ObjectStoreMessage ¶
type ObjectStoreMessage struct { Objects []*ObjectMessage `protobuf:"bytes,1,rep,name=objects" json:"objects,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*ObjectStoreMessage) Descriptor ¶
func (*ObjectStoreMessage) Descriptor() ([]byte, []int)
func (*ObjectStoreMessage) GetObjects ¶
func (m *ObjectStoreMessage) GetObjects() []*ObjectMessage
func (*ObjectStoreMessage) ProtoMessage ¶
func (*ObjectStoreMessage) ProtoMessage()
func (*ObjectStoreMessage) Reset ¶
func (m *ObjectStoreMessage) Reset()
func (*ObjectStoreMessage) String ¶
func (m *ObjectStoreMessage) String() string
type ProtectedObjectMessage ¶
type ProtectedObjectMessage struct { ProtectedObjId *ObjectIdMessage `protobuf:"bytes,1,req,name=protected_obj_id" json:"protected_obj_id,omitempty"` ProtectorObjId *ObjectIdMessage `protobuf:"bytes,2,opt,name=protector_obj_id" json:"protector_obj_id,omitempty"` Blob []byte `protobuf:"bytes,3,opt,name=blob" json:"blob,omitempty"` XXX_unrecognized []byte `json:"-"` }
func MakeProtectedObject ¶
func MakeProtectedObject(obj ObjectMessage, protectorName string, protectorEpoch int32, protectorKeys []byte) (*ProtectedObjectMessage, error)
Create, marshal and encrypt a protected object blob protecting obj.
func (*ProtectedObjectMessage) Descriptor ¶
func (*ProtectedObjectMessage) Descriptor() ([]byte, []int)
func (*ProtectedObjectMessage) GetBlob ¶
func (m *ProtectedObjectMessage) GetBlob() []byte
func (*ProtectedObjectMessage) GetProtectedObjId ¶
func (m *ProtectedObjectMessage) GetProtectedObjId() *ObjectIdMessage
func (*ProtectedObjectMessage) GetProtectorObjId ¶
func (m *ProtectedObjectMessage) GetProtectorObjId() *ObjectIdMessage
func (*ProtectedObjectMessage) ProtoMessage ¶
func (*ProtectedObjectMessage) ProtoMessage()
func (*ProtectedObjectMessage) Reset ¶
func (m *ProtectedObjectMessage) Reset()
func (*ProtectedObjectMessage) String ¶
func (m *ProtectedObjectMessage) String() string
type ProtectedObjectStoreMessage ¶
type ProtectedObjectStoreMessage struct { ProtectedObjects []*ProtectedObjectMessage `protobuf:"bytes,1,rep,name=protected_objects" json:"protected_objects,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*ProtectedObjectStoreMessage) Descriptor ¶
func (*ProtectedObjectStoreMessage) Descriptor() ([]byte, []int)
func (*ProtectedObjectStoreMessage) GetProtectedObjects ¶
func (m *ProtectedObjectStoreMessage) GetProtectedObjects() []*ProtectedObjectMessage
func (*ProtectedObjectStoreMessage) ProtoMessage ¶
func (*ProtectedObjectStoreMessage) ProtoMessage()
func (*ProtectedObjectStoreMessage) Reset ¶
func (m *ProtectedObjectStoreMessage) Reset()
func (*ProtectedObjectStoreMessage) String ¶
func (m *ProtectedObjectStoreMessage) String() string