remove

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBlueprintResponse

func DecodeBlueprintResponse(_ context.Context, r *http.Response) (interface{}, error)

func DecodeProfileResponse

func DecodeProfileResponse(_ context.Context, r *http.Response) (interface{}, error)

func EncodeError

func EncodeError(ctx context.Context, err error, w http.ResponseWriter)

func EncodeHTTPGenericRequest

func EncodeHTTPGenericRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeHTTPGenericRequest is a transport/http.EncodeRequestFunc that JSON-encodes any request to the request body. Primarily useful in a client.

func MakeRemoveBlueprintsEndpoint

func MakeRemoveBlueprintsEndpoint(svc Service) endpoint.Endpoint

func MakeRemoveProfilesEndpoint

func MakeRemoveProfilesEndpoint(svc Service) endpoint.Endpoint

Types

type Endpoints

type Endpoints struct {
	RemoveBlueprintsEndpoint endpoint.Endpoint
	RemoveProfilesEndpoint   endpoint.Endpoint
}

func MakeEndpoints

func MakeEndpoints(svc Service) Endpoints

func (Endpoints) RemoveBlueprints

func (e Endpoints) RemoveBlueprints(ctx context.Context, names []string) error

func (Endpoints) RemoveProfiles

func (e Endpoints) RemoveProfiles(ctx context.Context, ids []string) error

type HTTPHandlers

type HTTPHandlers struct {
	BlueprintHandler http.Handler
	ProfileHandler   http.Handler
}

func MakeHTTPHandlers

func MakeHTTPHandlers(ctx context.Context, endpoint Endpoints, opts ...httptransport.ServerOption) HTTPHandlers

type RemoveService

type RemoveService struct {
	Blueprints *blueprint.DB
	Profiles   *profile.DB
}

func (*RemoveService) RemoveBlueprints

func (svc *RemoveService) RemoveBlueprints(ctx context.Context, names []string) error

func (*RemoveService) RemoveProfiles

func (svc *RemoveService) RemoveProfiles(ctx context.Context, ids []string) error

type Service

type Service interface {
	RemoveBlueprints(ctx context.Context, names []string) error
	RemoveProfiles(ctx context.Context, ids []string) error
}

func NewClient

func NewClient(instance string, logger log.Logger, token string, opts ...httptransport.ClientOption) (Service, error)

Jump to

Keyboard shortcuts

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