resource

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package resource represents resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaData

type MetaData struct {
	Key   string
	Value string
}

MetaData resource metadata

type Resource

type Resource struct {
	Kind        string
	UUID        string
	Name        string
	ExternalID  string
	RelatedWith []Resource
	MetaData    []MetaData
}

Resource represent resource

func NewResource

func NewResource(kind, uuid, name, externalID string, scanner string) Resource

NewResource construct new resource

func (*Resource) AddMetaData

func (r *Resource) AddMetaData(key, value string)

AddMetaData adds meta data for each resource

func (*Resource) AddRelation

func (r *Resource) AddRelation(relatedResource Resource)

AddRelation build relation between resources

func (*Resource) FindMetaValue

func (r *Resource) FindMetaValue(key string) string

FindMetaValue finds meta value by key

Jump to

Keyboard shortcuts

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