Versions in this module Expand all Collapse all v1 v1.0.0 Aug 4, 2016 Changes in this version + const FieldDelimiter + const MaxObjectIDLen + const MinObjectIDLen + const PathDelimiter + const ValidOIDChars + var ErrObjectNilFields = errors.New("object had nil for Fields") + var FieldRegex = regexp.MustCompile(`[^a-zA-Z0-9./()]+`) + var OIDRegex = regexp.MustCompile(`[^a-f0-9]+`) + var PathRegex = regexp.MustCompile(`[^a-zA-Z0-9./-]+`) + func AddParamToDoc(doc *pb.Document, target *SRI, param *pb.Parameter) error + func AddParameterFields(field *pb.Field, params map[string]*pb.Field) + func ApplyArguments(field *pb.Field, args ...*pb.Argument) error + func CreateDocument(name, path string, ptr interface{}) (*pb.Document, error) + func CreateLinkInDocument(doc *pb.Document, target *pb.Link, source *SRI) error + func CreateObject(key string, ptr interface{}) (*pb.Object, error) + func FieldValueEquals(this, other *pb.Field) bool + func GetFieldFromDocument(doc *pb.Document, fieldpath string) (*pb.Field, error) + func InteractiveArgs(r io.ReadCloser, w io.Writer, field *pb.Field, required bool) error + func MapFromDocument(doc *pb.Document) (map[string]interface{}, error) + func MapFromObject(obj *pb.Object) (map[string]interface{}, error) + func NewLink(packageName string, target *SRI, override bool) *pb.Link + func ObjectFromMap(key string, data map[string]interface{}) (*pb.Object, error) + func ParameterFields(docs map[string]*pb.Document) map[string]*pb.Field + func ParseArguments(in string, coerceStr bool) (args []*pb.Argument, err error) + func ResolveRelativeField(field *pb.Field, fieldpath string) (resolvedField *pb.Field, err error) + func Unmarshal(doc *pb.Document, ptr interface{}) error + func ValidateField(fieldStr string) (string, error) + func ValidateOID(oidStr string) (string, error) + func ValidatePath(pathStr string) (string, error) + type SRI struct + Field string + Path string + Treeish string + func ParseSRI(rawsri string) (*SRI, error) + func (s *SRI) IsDocument() bool + func (s *SRI) IsField() bool + func (s *SRI) IsTree() bool + func (s *SRI) Proto() *pb.SRI + func (s *SRI) String() string