hateoas

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLinkToLinksArray

func AddLinkToLinksArray(target *[]*furopb.Link, link *furopb.Link, linkType string)

Add a HTS link. If Method is not given, GET is used

func BaseUrlFromContext

func BaseUrlFromContext(ctx context.Context) string

*

  • Reads the first api-base-url from context
  • The first is the one which is outermost.

func ReplacePaternWithIdmap

func ReplacePaternWithIdmap(pattern string, idmap Idmap) string

Types

type Builder

type Builder struct {
	ServiceName string
}

func NewHTSBuilder

func NewHTSBuilder(ServiceName string) *Builder

func (*Builder) CollectionHTS

func (b *Builder) CollectionHTS(ctx context.Context, listingOptions types.ListingOptions, listingMetas types.ListingMetas, idmap Idmap, urlPattern string, s ...string) []*furopb.Link

func (*Builder) EntityHTS

func (b *Builder) EntityHTS(ctx context.Context, entitytype string, ids Idmap, urlPattern string, htsMethods ...string) []*furopb.Link

type Idmap

type Idmap map[string]string

Jump to

Keyboard shortcuts

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