Skip to content

Latest commit

 

History

History
121 lines (71 loc) · 3.58 KB

occi_link.md

File metadata and controls

121 lines (71 loc) · 3.58 KB

Module occi_link

.

Copyright (c) (C) 2016, Jean Parpaillon

Authors: Jean Parpaillon (jean.parpaillon@free.fr).

Data Types

abstract datatype: t()

Function Index

change_prefix/3Change urls prefix.
endpoint/2Make source / target urls relative to endpoint URL are canonicalized: default ports are added to scheme if necessary Throws {invalid_link, binary()} if source is outside of endpoint's domain.
from_map/2
new/1
new/3Equivalent to new(KindId, Src, Target, occi_resource:kind(Target)).
new/5Creates a new link.
source/1
target/1

Function Details

change_prefix/3


change_prefix(Op::occi_uri:prefix_op(), Prefix::binary(), Link::t()) -> t()

Change urls prefix

endpoint/2


endpoint(Endpoint::occi_uri:url(), Link::t()) -> t()

throws {invalid_link, binary()}

Make source / target urls relative to endpoint URL are canonicalized: default ports are added to scheme if necessary Throws {invalid_link, binary()} if source is outside of endpoint's domain

from_map/2


from_map(Kind::occi_kind:t(), Map::occi_rendering:ast()) -> t()

new/1

new(Kind) -> any()

new/3


new(KindId::occi_category:id() | binary(), Src::binary() | occi_resource:t(), Target::binary() | occi_resource:t()) -> t()

Equivalent to new(KindId, Src, Target, occi_resource:kind(Target)).

new/5


new(KindId::occi_category:id() | binary(), Src::binary(), SrcKind::occi_category:id(), Target::binary(), TargetKind::occi_category:id() | undefined) -> t()

Creates a new link

source/1


source(E::t()) -> occi_uri:url()

target/1


target(E::t()) -> occi_uri:url()