extensions

package
Version: v0.0.0-...-3529631 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserProfileKeysetID

func GetUserProfileKeysetID(up *nks.UserProfile, org int, prov string) (int, error)

GetUserProfileKeysetID - extended This method in the SDK Client returns the first matching keyset for the specified provider regardless of what organization it belongs to. This can result in errors such as "Provider credential does not belong to organization: $ORG"

Types

type SDK

type SDK struct {
	nks.APIClient
}

SDK is a stub for nks.APIClient. We will define extension methods as an extension of this type, since we cannot directly define new methods on imported types. See: https://golang.org/doc/effective_go.html#embedding

func NewClient

func NewClient(token, endpoint string) *SDK

NewClient returns a new api client

func (*SDK) GetNotifications

func (c *SDK) GetNotifications() (ns []*models.Notification, err error)

GetNotifications returns user notifications

func (SDK) RunRequest

func (c SDK) RunRequest(req *nks.APIReq) error

RunRequest is identical to the original unexported function in the nks sdk

Jump to

Keyboard shortcuts

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