crossref

package
v0.0.0-...-8832f83 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

_       _

*__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesoftwarefdn/weaviate/blob/develop/LICENSE.md * DESIGN & CONCEPT: Bob van Luijt (@bobvanluijt) * CONTACT: hello@creativesoftwarefdn.org

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ref

type Ref struct {
	Local    bool
	PeerName string
	TargetID strfmt.UUID
	Kind     kind.Kind
}

Ref is an abstraction of the cross-refs which are specified in a URI format in the API. When this type is used it is safe to assume that a Ref is semantically valid. This guarantuee would not be possible on the URI format, as the URI can be well-formed, but not contain the data we expect in it. Do not use directly, such as crossref.Ref{}, as you won't have any guarantees in this case. Always use one of the parsing options or New()

func New

func New(peerName string, target strfmt.UUID, k kind.Kind) *Ref

New is a safe way to generate a Reference, as all required arguments must be set in the constructor fn

func Parse

func Parse(uriString string) (*Ref, error)

Parse is a safe way to generate a Ref, as it will error if any of the input parameters are not as expected.

func ParseSingleRef

func ParseSingleRef(singleRef *models.SingleRef) (*Ref, error)

ParseSingleRef is a safe way to generate a Ref from a models.SingleRef, a helper construct that represents the API structure. It will error if any of the input parameters are not as expected.

func (*Ref) SingleRef

func (r *Ref) SingleRef() *models.SingleRef

SingleRef converts the parsed Ref back into the API helper construct containing a stringified representation (URI format) of the Ref

func (*Ref) String

func (r *Ref) String() string

Jump to

Keyboard shortcuts

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