core

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIEntry

type APIEntry interface {
	Get(method string, params url.Values) (map[string]*json.RawMessage, error)
	Post(method string, data url.Values) (map[string]*json.RawMessage, error)
}

APIEntry provides functions for an endpoint

func NewAPIEntry

func NewAPIEntry(s Session, path string, api string, version string) APIEntry

NewAPIEntry creates an APIEntry object

type Session

type Session interface {
	GetSid() string
	Login(synoOption *options.SynologyOptions) (string, error)
	Logout() error
	Get(path string, params url.Values) (*http.Response, error)
	Post(path string, data url.Values) (*http.Response, error)
}

Session provides session level functions

func NewSession

func NewSession(baseURL string, sessionName string) Session

NewSession creates a new Session object

Jump to

Keyboard shortcuts

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