policy_client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalClient

type ExternalClient struct {
	JsonClient jsonClient
}

func NewExternal

func NewExternal(logger lager.Logger, httpClient httpClient, url string) *ExternalClient

func (*ExternalClient) AddPolicies

func (c *ExternalClient) AddPolicies(token string, policies []models.Policy) error

func (*ExternalClient) DeletePolicies

func (c *ExternalClient) DeletePolicies(token string, policies []models.Policy) error

func (*ExternalClient) GetPolicies

func (c *ExternalClient) GetPolicies(token string) ([]models.Policy, error)

func (*ExternalClient) GetPoliciesByID

func (c *ExternalClient) GetPoliciesByID(token string, ids ...string) ([]models.Policy, error)

type ExternalPolicyClient

type ExternalPolicyClient interface {
	GetPolicies(token string) ([]models.Policy, error)
	GetPoliciesByID(token string, ids ...string) ([]models.Policy, error)
	DeletePolicies(token string, policies []models.Policy) error
	AddPolicies(token string, policies []models.Policy) error
}

type InternalClient

type InternalClient struct {
	JsonClient jsonClient
}

func NewInternal

func NewInternal(logger lager.Logger, httpClient httpClient, url string) *InternalClient

func (*InternalClient) GetPolicies

func (c *InternalClient) GetPolicies() ([]models.Policy, error)

type JsonClient

type JsonClient struct {
	Logger      lager.Logger
	HttpClient  httpClient
	Url         string
	Marshaler   marshal.Marshaler
	Unmarshaler marshal.Unmarshaler
}

func (*JsonClient) Do

func (c *JsonClient) Do(method, route string, reqData, respData interface{}, token string) error

Jump to

Keyboard shortcuts

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