Documentation ¶
Index ¶
- Constants
- Variables
- type ResourceDescriptor
- func (*ResourceDescriptor) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceDescriptor) GetAnnotations() *structpb.Struct
- func (x *ResourceDescriptor) GetContent() []byte
- func (x *ResourceDescriptor) GetDigest() map[string]string
- func (x *ResourceDescriptor) GetDownloadLocation() string
- func (x *ResourceDescriptor) GetMediaType() string
- func (x *ResourceDescriptor) GetName() string
- func (x *ResourceDescriptor) GetUri() string
- func (*ResourceDescriptor) ProtoMessage()
- func (x *ResourceDescriptor) ProtoReflect() protoreflect.Message
- func (x *ResourceDescriptor) Reset()
- func (x *ResourceDescriptor) String() string
- func (d *ResourceDescriptor) Validate() error
- type Statement
- func (*Statement) Descriptor() ([]byte, []int)deprecated
- func (x *Statement) GetPredicate() *structpb.Struct
- func (x *Statement) GetPredicateType() string
- func (x *Statement) GetSubject() []*ResourceDescriptor
- func (x *Statement) GetType() string
- func (*Statement) ProtoMessage()
- func (x *Statement) ProtoReflect() protoreflect.Message
- func (x *Statement) Reset()
- func (x *Statement) String() string
- func (s *Statement) Validate() error
Constants ¶
View Source
const StatementTypeUri = "https://in-toto.io/Statement/v1"
Variables ¶
View Source
var ( ErrIncorrectDigestLength = errors.New("digest has incorrect length") ErrInvalidDigestEncoding = errors.New("digest is not valid hex-encoded string") ErrRDRequiredField = errors.New("at least one of name, URI, or digest are required") )
View Source
var ( ErrInvalidStatementType = errors.New("wrong statement type") ErrSubjectRequired = errors.New("at least one subject required") ErrDigestRequired = errors.New("at least one digest required") ErrPredicateTypeRequired = errors.New("predicate type required") ErrPredicateRequired = errors.New("predicate object required") )
View Source
var File_in_toto_attestation_v1_resource_descriptor_proto protoreflect.FileDescriptor
View Source
var File_in_toto_attestation_v1_statement_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ResourceDescriptor ¶
type ResourceDescriptor struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` Digest map[string]string `` /* 153-byte string literal not displayed */ Content []byte `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` DownloadLocation string `protobuf:"bytes,5,opt,name=download_location,json=downloadLocation,proto3" json:"download_location,omitempty"` MediaType string `protobuf:"bytes,6,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` // Per the Struct protobuf spec, this type corresponds to // a JSON Object, which is truly a map<string, Value> under the hood. // So, the Struct a) is still consistent with our specification for // the `annotations` field, and b) has native support in some language // bindings making their use easier in implementations. // See: https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb#Struct Annotations *structpb.Struct `protobuf:"bytes,7,opt,name=annotations,proto3" json:"annotations,omitempty"` // contains filtered or unexported fields }
Proto representation of the in-toto v1 ResourceDescriptor. https://github.com/in-toto/attestation/blob/main/spec/v1/resource_descriptor.md Validation of all fields is left to the users of this proto.
func (*ResourceDescriptor) Descriptor
deprecated
func (*ResourceDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use ResourceDescriptor.ProtoReflect.Descriptor instead.
func (*ResourceDescriptor) GetAnnotations ¶
func (x *ResourceDescriptor) GetAnnotations() *structpb.Struct
func (*ResourceDescriptor) GetContent ¶
func (x *ResourceDescriptor) GetContent() []byte
func (*ResourceDescriptor) GetDigest ¶
func (x *ResourceDescriptor) GetDigest() map[string]string
func (*ResourceDescriptor) GetDownloadLocation ¶
func (x *ResourceDescriptor) GetDownloadLocation() string
func (*ResourceDescriptor) GetMediaType ¶
func (x *ResourceDescriptor) GetMediaType() string
func (*ResourceDescriptor) GetName ¶
func (x *ResourceDescriptor) GetName() string
func (*ResourceDescriptor) GetUri ¶
func (x *ResourceDescriptor) GetUri() string
func (*ResourceDescriptor) ProtoMessage ¶
func (*ResourceDescriptor) ProtoMessage()
func (*ResourceDescriptor) ProtoReflect ¶
func (x *ResourceDescriptor) ProtoReflect() protoreflect.Message
func (*ResourceDescriptor) Reset ¶
func (x *ResourceDescriptor) Reset()
func (*ResourceDescriptor) String ¶
func (x *ResourceDescriptor) String() string
func (*ResourceDescriptor) Validate ¶
func (d *ResourceDescriptor) Validate() error
type Statement ¶
type Statement struct { // Expected to always be "https://in-toto.io/Statement/v1" Type string `protobuf:"bytes,1,opt,name=type,json=_type,proto3" json:"type,omitempty"` Subject []*ResourceDescriptor `protobuf:"bytes,2,rep,name=subject,proto3" json:"subject,omitempty"` PredicateType string `protobuf:"bytes,3,opt,name=predicate_type,json=predicateType,proto3" json:"predicate_type,omitempty"` Predicate *structpb.Struct `protobuf:"bytes,4,opt,name=predicate,proto3" json:"predicate,omitempty"` // contains filtered or unexported fields }
Proto representation of the in-toto v1 Statement. https://github.com/in-toto/attestation/tree/main/spec/v1 Validation of all fields is left to the users of this proto.
func (*Statement) Descriptor
deprecated
func (*Statement) GetPredicate ¶
func (*Statement) GetPredicateType ¶
func (*Statement) GetSubject ¶
func (x *Statement) GetSubject() []*ResourceDescriptor
func (*Statement) ProtoMessage ¶
func (*Statement) ProtoMessage()
func (*Statement) ProtoReflect ¶
func (x *Statement) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.