sdk

package module
v0.0.0-...-685b04b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2016 License: AGPL-3.0 Imports: 10 Imported by: 4

README

Build Status GoDoc Go Report Card codecov

This repository contains the development library used by multiple ClawIO services.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	Token(username, password string) (string, *codes.Response, error)
}

AuthService is the interface that deals with the calls to an authentication authentication.

type DataService

type DataService interface {
	Upload(pathSpec string, r io.Reader, checksum string) (*codes.Response, error)
	Download(pathSpec string) (io.Reader, *codes.Response, error)
}

DataService is the interface that specifies the methods to call a data service.

type MetaDataService

type MetaDataService interface {
	Init() (*codes.Response, error)
	CreateTree(pathSpec string) (*codes.Response, error)
	ExamineObject(pathSpec string) (*entities.ObjectInfo, *codes.Response, error)
	ListTree(pathSpec string) ([]*entities.ObjectInfo, *codes.Response, error)
	DeleteObject(pathSpec string) (*codes.Response, error)
	MoveObject(sourcePathSpec, targetPathSpec string) (*codes.Response, error)
}

MetaDataService is the interface that specifies the methods to call a metaData service.

type SDK

type SDK struct {
	Auth AuthService
	Data DataService
	Meta MetaDataService
}

SDK contains services used for talking to different parts of the ClawIO API.

func New

func New(urls *ServiceEndpoints, httpClient *http.Client) *SDK

New creates a new SDK.

type ServiceEndpoints

type ServiceEndpoints struct {
	AuthServiceBaseURL     string
	DataServiceBaseURL     string
	MetaDataServiceBaseURL string
}

ServiceEndpoints contains the url of the different services of ClawIO.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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