noteapi

package
v1.2.30 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package noteapi contains curated functions which iteract with the deployment notes API, exposing an API which its usage is preferred over the direct client calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(params AddParams) error

Add posts a new message to the specified deployment

func Get

func Get(params GetParams) (*models.Note, error)

Get obtains a note from a deployment and note ID

func List

func List(params Params) (*models.Notes, error)

List lists all of the notes for the deployment

func Update

func Update(params UpdateParams) (*models.Note, error)

Update updates a note from its deployment and note ID

Types

type AddParams

type AddParams struct {
	Params
	Message string
	UserID  string
}

AddParams is consumed by Add.

func (AddParams) Validate

func (params AddParams) Validate() error

Validate ensures the parameters are valid

type GetParams

type GetParams struct {
	Params
	NoteID string
}

GetParams is used on List

func (GetParams) Validate

func (params GetParams) Validate() error

Validate confirms the parmeters are valid

type ListParams

type ListParams struct {
	Params
}

ListParams is used by List

type Params

type Params struct {
	*api.API
	ID     string
	Region string
}

Params is used on Get and Update Notes

func (Params) Validate

func (params Params) Validate() error

Validate ensures that the parameters are usable by the consuming function.

type UpdateParams

type UpdateParams struct {
	Params
	NoteID  string
	UserID  string
	Message string
}

UpdateParams is used on Update

func (UpdateParams) Validate

func (params UpdateParams) Validate() error

Validate confirms the parmeters are valid

Jump to

Keyboard shortcuts

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