mindpack

package
v0.0.0-...-2ae1b53 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathProfiles     = "profiles"
	PathRuleTypes    = "rule_types"
	ManifestFileName = "manifest.json"
	SHA256           = "sha-256"
)

Variables

View Source
var (
	DnsStyleNameRegex = regexp.MustCompile(`^[a-zA-Z0-9](?:[-_a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$`)
)
View Source
var File_proto_mindpack_v1_mindpack_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	Manifest *Manifest
	Metadata *Metadata
	Files    *Files
	Source   fs.StatFS
}

func NewBundleFromDirectory

func NewBundleFromDirectory(path string) (*Bundle, error)

func (*Bundle) ReadSource

func (b *Bundle) ReadSource() error

ReadSource loads the data from the mindpack source filesystem

func (*Bundle) UpdateManifest

func (b *Bundle) UpdateManifest() error

UpdateManifest updates the bundle manifest to reflect the bundle data source

func (*Bundle) Verify

func (b *Bundle) Verify() error

Verify checks the contents of the bundle against its manifest

type File

type File struct {
	Name   string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Hashes map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*File) Descriptor deprecated

func (*File) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetHashes

func (x *File) GetHashes() map[string]string

func (*File) GetName

func (x *File) GetName() string

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

func (x *File) ProtoReflect() protoreflect.Message

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type Files

type Files struct {
	Profiles  []*File `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"`
	RuleTypes []*File `protobuf:"bytes,2,rep,name=ruleTypes,json=rule_types,proto3" json:"ruleTypes,omitempty"`
	// contains filtered or unexported fields
}

func (*Files) Descriptor deprecated

func (*Files) Descriptor() ([]byte, []int)

Deprecated: Use Files.ProtoReflect.Descriptor instead.

func (*Files) GetProfiles

func (x *Files) GetProfiles() []*File

func (*Files) GetRuleTypes

func (x *Files) GetRuleTypes() []*File

func (*Files) ProtoMessage

func (*Files) ProtoMessage()

func (*Files) ProtoReflect

func (x *Files) ProtoReflect() protoreflect.Message

func (*Files) Reset

func (x *Files) Reset()

func (*Files) String

func (x *Files) String() string

type Manifest

type Manifest struct {
	Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Files    *Files    `protobuf:"bytes,2,opt,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

func (*Manifest) Descriptor deprecated

func (*Manifest) Descriptor() ([]byte, []int)

Deprecated: Use Manifest.ProtoReflect.Descriptor instead.

func (*Manifest) GetFiles

func (x *Manifest) GetFiles() *Files

func (*Manifest) GetMetadata

func (x *Manifest) GetMetadata() *Metadata

func (*Manifest) ProtoMessage

func (*Manifest) ProtoMessage()

func (*Manifest) ProtoReflect

func (x *Manifest) ProtoReflect() protoreflect.Message

func (*Manifest) Read

func (m *Manifest) Read(r io.Reader) error

Read loads the manifest data by parsing json data from reader r

func (*Manifest) Reset

func (x *Manifest) Reset()

func (*Manifest) String

func (x *Manifest) String() string

func (*Manifest) Write

func (m *Manifest) Write(w io.Writer) error

Write writes the bundle manifest to a file

type Metadata

type Metadata struct {
	Name      string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string                 `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Version   string                 `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Date      *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=date,proto3" json:"date,omitempty"`
	// contains filtered or unexported fields
}

func (*Metadata) Descriptor deprecated

func (*Metadata) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetDate

func (x *Metadata) GetDate() *timestamppb.Timestamp

func (*Metadata) GetName

func (x *Metadata) GetName() string

func (*Metadata) GetNamespace

func (x *Metadata) GetNamespace() string

func (*Metadata) GetVersion

func (x *Metadata) GetVersion() string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

Jump to

Keyboard shortcuts

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