Documentation ¶
Overview ¶
******************************************************************************
- Copyright 2021 Dell Inc. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Copyright 2021 Dell Inc. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
******************************************************************************
- Copyright 2021 Dell Inc. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewULID ¶
func NewULID() ulid.ULID
NewULID is a convenience function for generating ULIDs where necessary. It is based on the example showing the "quick" method for initializing the algorithm's entropy parameter. https://github.com/oklog/ulid/blob/c6bb9e1d94a82e71dfd7ff279aa6cea7c52779bb/cmd/ulid/main.go#L67 As described on that page, quick means "when generating, use non-crypto-grade entropy".
Types ¶
type Annotation ¶
type Annotation struct { Id ulid.ULID `json:"id,omitempty"` // Id should probably be a ULID -- uniquely identifies the annotation itself Key string `json:"key,omitempty"` // Key is the hash value of the data being annotated Hash HashType `json:"hash,omitempty"` // Hash identifies which algorithm was used to construct the hash Host string `json:"host,omitempty"` // Host is the hostname of the node making the annotation Kind AnnotationType `json:"kind,omitempty"` // Kind indicates what kind of annotation this is Signature string `json:"signature,omitempty"` // Signature contains the signature of the party making the annotation IsSatisfied bool `json:"isSatisfied"` // IsSatisfied indicates whether the criteria defining the annotation were fulfilled Timestamp time.Time `json:"timestamp,omitempty"` // Timestamp indicates when the annotation was created }
Annotation represents an individual criterion of evaluation in regard to a piece of data
func NewAnnotation ¶
func NewAnnotation(key string, hash HashType, host string, kind AnnotationType, satisfied bool) Annotation
NewAnnotation is the constructor for an Annotation instance.
func (*Annotation) UnmarshalJSON ¶
func (a *Annotation) UnmarshalJSON(data []byte) (err error)
type AnnotationList ¶
type AnnotationList struct {
Items []Annotation `json:"items,omitempty"` // Items contains 0-many annotations
}
AnnotationList is an envelope for zero to many annotations
type AnnotationType ¶
type AnnotationType string
const ( AnnotationPKI AnnotationType = "pki" AnnotationSource AnnotationType = "src" AnnotationTLS AnnotationType = "tls" AnnotationTPM AnnotationType = "tpm" )
func (AnnotationType) Validate ¶
func (t AnnotationType) Validate() bool
type KeyAlgorithm ¶
type KeyAlgorithm string
const (
KeyEd25519 KeyAlgorithm = "ed25519"
)
func (KeyAlgorithm) Validate ¶
func (k KeyAlgorithm) Validate() bool
type StreamType ¶
type StreamType string
const ( IotaStream StreamType = "iota" MockStream StreamType = "mock" MqttStream StreamType = "mqtt" PravegaStream StreamType = "pravega" // Currently unsupported but indicating extension point )
func (StreamType) Validate ¶
func (t StreamType) Validate() bool