connector

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2018 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API implements the DirectoryConnector inferface. It uses an HTTP API to communicate with the WordPress Directory SVN Repositories.

func (*API) GetFullExtensionsList

func (api *API) GetFullExtensionsList(ctx *context.Context) ([]string, error)

GetFullExtensionsList gets the fill list of all Extensions.

func (API) GetLatestRevision

func (api API) GetLatestRevision(ctx *context.Context) (int, error)

GetLatestRevision gets the latest revision of the target directory.

func (*API) GetUpdatedExtensionsList

func (api *API) GetUpdatedExtensionsList(ctx *context.Context) ([]string, error)

GetUpdatedExtensionsList an updated list of Extensions.

type DirectoryConnector

type DirectoryConnector interface {
	GetLatestRevision(ctx *context.Context) (int, error)
	GetFullExtensionsList(ctx *context.Context) ([]string, error)
	GetUpdatedExtensionsList(ctx *context.Context) ([]string, error)
}

DirectoryConnector implements the methods required to interact with the WordPress Directories Implemented via external HTTP API and local SVN client

func Init

func Init(cType string) DirectoryConnector

Init returns a connector used to communicate with the WordPress Directory SVN repositories. Implemented via an external HTTP API or local SVN client

type SVN

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

SVN implements the DirectoryConnector inferface. It uses a local SVN client to communicate with the WordPress Directory SVN Repositories.

func (*SVN) GetFullExtensionsList

func (svn *SVN) GetFullExtensionsList(ctx *context.Context) ([]string, error)

GetFullExtensionsList gets the fill list of all Extensions.

func (*SVN) GetLatestRevision

func (svn *SVN) GetLatestRevision(ctx *context.Context) (int, error)

GetLatestRevision gets the latest revision of the target directory.

func (*SVN) GetUpdatedExtensionsList

func (svn *SVN) GetUpdatedExtensionsList(ctx *context.Context) ([]string, error)

GetUpdatedExtensionsList gets an updated list of Extensions.

Jump to

Keyboard shortcuts

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