lmdq

package module
v0.0.0-...-34b6c4d Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 16 Imported by: 1

README

Go Report Card

lMDQ

lMDQ is a local MDQ Server for SAML metadata - ie it caches locally a remote metadata feed.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MetaDataNotFoundError refers to error
	MetaDataNotFoundError = errors.New("Metadata not found")
)

Functions

This section is empty.

Types

type EntityRec

type EntityRec struct {
	// contains filtered or unexported fields
}

EntityRec refers entity info

type MDQ

type MDQ struct {
	config.MdDb

	Cache map[string]*MdXp
	Lock  sync.RWMutex
	// contains filtered or unexported fields
}

MDQ refers to metadata query

func (*MDQ) MDQ

func (mdq *MDQ) MDQ(key string) (xp *goxml.Xp, err error)

MDQ looks up an entity using the supplied feed and key. The key can be an entityID or a location, optionally in {sha1} format It returns a non nil err if the entity is not found and the metadata and a hash/etag over the content if it is. The hash can be used to decide if a cached dom object is still valid, This might be an optimization as the database lookup is much faster that the parsing.

func (*MDQ) MDQFilter

func (mdq *MDQ) MDQFilter(xpathfilter string) (xp *goxml.Xp, numberOfEntities int, err error)

MDQFilter refers Filtering by xpath for testing purposes

func (*MDQ) Open

func (mdq *MDQ) Open() (err error)

Open refers to open metadata file

func (*MDQ) WebMDQ

func (mdq *MDQ) WebMDQ(key string) (xp *goxml.Xp, xml []byte, err error)

WebMDQ - Export of dbget

type MdXp

type MdXp struct {
	*goxml.Xp
	// contains filtered or unexported fields
}

MdXp refers to check validity

func (*MdXp) Valid

func (xp *MdXp) Valid(duration time.Duration) bool

Valid refers to check the validity of metadata

Jump to

Keyboard shortcuts

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