golink

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the golink client.

func New

func New(apiURL string, debug bool, namespace string) *Client

New - Create new golink Client.

func (Client) AddLabel

func (c Client) AddLabel(ctx context.Context, label models.LabelRequest) (models.Label, error)

AddLabel adds a label to the database.

func (c Client) CreateLink(ctx context.Context, link models.LinkRequest) (models.Link, error)

CreateLink creates a link in the database.

func (Client) CreateNamespace

func (c Client) CreateNamespace(ctx context.Context, namespace string) (ns models.Namespace, err error)

CreateNamespace creates a namespace in the database.

func (Client) DeleteLabelByID

func (c Client) DeleteLabelByID(ctx context.Context, labelID models.LabelID) error

DeleteLabelByID deletes a label from the database.

func (Client) DeleteLabelByName

func (c Client) DeleteLabelByName(ctx context.Context, name string) error

DeleteLabelByName deletes a label from the database.

func (c Client) DeleteLink(ctx context.Context, linkID models.LinkID) error

DeleteLink deletes a link from the database. Is a alias for DeleteLinkByID.

func (Client) DeleteLinkByID

func (c Client) DeleteLinkByID(ctx context.Context, linkID models.LinkID) error

DeleteLinkByID deletes a link from the database.

func (Client) DeleteLinkByName

func (c Client) DeleteLinkByName(ctx context.Context, name string) error

DeleteLinkByName deletes a link from the database.

func (Client) DeleteNamespace

func (c Client) DeleteNamespace(ctx context.Context, namespace string) (err error)

DeleteNamespace deletes a namespace from the database.

func (Client) GetLabelByID

func (c Client) GetLabelByID(ctx context.Context, labelID models.LabelID) (label models.Label, err error)

GetLabelByID gets a label from the database.

func (Client) GetLabelByName

func (c Client) GetLabelByName(ctx context.Context, name string) (label models.Label, err error)

GetLabelByName gets a label from the database.

func (Client) GetLabels

func (c Client) GetLabels(ctx context.Context) (labels []models.Label, err error)

GetLabels gets a list of labels from the database.

func (Client) GetLinkByID

func (c Client) GetLinkByID(ctx context.Context, linkID models.LinkID) (link models.Link, err error)

GetLinkByID gets a link from the database.

func (Client) GetLinkByName

func (c Client) GetLinkByName(ctx context.Context, name string) (link models.Link, err error)

GetLinkByNames gets a link from the database.

func (c Client) GetLinks(ctx context.Context) (links []models.Link, err error)

GetLinks gets a list of links from the database.

func (Client) GetLinksAllNamespace

func (c Client) GetLinksAllNamespace(ctx context.Context) (links []models.Link, err error)

GetLinksAllNamespace gets a list of links from all namespaces.

func (Client) GetLinksAssociatedToLabel

func (c Client) GetLinksAssociatedToLabel(ctx context.Context, labelID models.LabelID) (links []models.Link, err error)

GetLinksAssociatedToLabel gets a list of links associated to a label from the database.

func (Client) GetNamespace

func (c Client) GetNamespace(ctx context.Context, namespace string) (ns models.Namespace, err error)

GetNamespace gets a namespace from the database.

func (Client) GetNamespaces

func (c Client) GetNamespaces(ctx context.Context) (namespaces []models.Namespace, err error)

GetNamespaces gets a list of namespaces from the database.

func (Client) GetVersion

func (c Client) GetVersion(ctx context.Context) (version string, err error)

GetVersion - Get the version of the application.

func (*Client) SetNamespace

func (c *Client) SetNamespace(namespace string)

SetNamespace - Set namespace for golink Client.

func (c Client) UpdateLink(ctx context.Context, link models.LinkRequest, linkID string) error

UpdateLink updates a link in the database.

Jump to

Keyboard shortcuts

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