serviceapi

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 3 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 {
	// TargetUrl points to API.
	TargetUrl string
	// Credentials is a credentials of API.
	Credentials *Credentials
	// Spec contains specification of an API.
	Spec []byte
}

API is an internal representation of a service's API.

type Credentials

type Credentials struct {
	// Oauth is OAuth configuration.
	Oauth Oauth
}

Credentials contains OAuth configuration.

type Oauth

type Oauth struct {
	// URL to OAuth token provider.
	URL string
	// ClientID to use for authentication.
	ClientID string
	// ClientSecret to use for authentication.
	ClientSecret string
}

Oauth contains details of OAuth configuration

type Service

type Service interface {
	// Read reads API from Remote Environment API definition. It also reads all additional information.
	Read(*remoteenv.ServiceAPI) (*API, apperrors.AppError)
}

Service manages API definition of a service

func NewService

func NewService(secretsRepository secrets.Repository) Service

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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