wit

package
v0.0.0-...-9ac85d6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMockOwner = "mockTenantID"

DefaultMockOwner is a mock owner value to be used by tests

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client that interacts with Work Item Tracker service

func (*Client) SearchCodebase

func (w *Client) SearchCodebase(repo string) (*Info, error)

SearchCodebase finds and returns owner of a given repository based on URL.

type Info

type Info struct {
	OwnedBy string
}

Info holds information about owner of a git repository.

func (*Info) UnmarshalJSON

func (wi *Info) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON parses byte slice representing quite complicated API response into a simple struct.

type Mock

type Mock struct {
	OwnedBy string
}

Mock implementation of WIT Service

func (*Mock) SearchCodebase

func (w *Mock) SearchCodebase(repo string) (*Info, error)

SearchCodebase is a mock method

type Service

type Service interface {
	SearchCodebase(repo string) (*Info, error)
}

Service describes work item tracker service of OSIO.

func New

func New(url string, token string) Service

New creates an instance of WIT client.

Jump to

Keyboard shortcuts

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