pmsrest

package
v0.0.0-...-1643d90 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: UPL-1.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(ps pms.PolicyStoreManager) (*mux.Router, error)

func ParseForFilters

func ParseForFilters(r *http.Request) string

ParseForFilters parse query filter from request returns value of query parameter - filter

func ParseRequestURI

func ParseRequestURI(r *http.Request) (string, string)

returns:

  1. ServiceName
  2. policy/role-policy ID

Types

type GetDiscoverPoliciesResponse

type GetDiscoverPoliciesResponse struct {
	Services []*pms.Service `json:"services"`
	Revision int64          `json:"revision"`
}

type GetDiscoverRequestsResponse

type GetDiscoverRequestsResponse struct {
	Requests []*ads.RequestContext `json:"requests"`
	Revision int64                 `json:"revision"`
}

type RESTService

type RESTService struct {
	PolicyStore pms.PolicyStoreManager
}

func NewRestService

func NewRestService(s pms.PolicyStoreManager) (*RESTService, error)

func (*RESTService) CreateFunction

func (mgr *RESTService) CreateFunction(w http.ResponseWriter, r *http.Request)

func (*RESTService) CreatePolicy

func (mgr *RESTService) CreatePolicy(w http.ResponseWriter, r *http.Request)

Policy management

func (*RESTService) CreateRolePolicy

func (mgr *RESTService) CreateRolePolicy(w http.ResponseWriter, r *http.Request)

Role policy management

func (*RESTService) CreateService

func (mgr *RESTService) CreateService(w http.ResponseWriter, r *http.Request)

Service management

func (*RESTService) DeleteFunction

func (mgr *RESTService) DeleteFunction(w http.ResponseWriter, r *http.Request)

func (*RESTService) DeleteFunctions

func (mgr *RESTService) DeleteFunctions(w http.ResponseWriter, r *http.Request)

func (*RESTService) DeletePolicies

func (mgr *RESTService) DeletePolicies(w http.ResponseWriter, r *http.Request)

func (*RESTService) DeletePolicy

func (mgr *RESTService) DeletePolicy(w http.ResponseWriter, r *http.Request)

func (*RESTService) DeleteRolePolicies

func (mgr *RESTService) DeleteRolePolicies(w http.ResponseWriter, r *http.Request)

func (*RESTService) DeleteRolePolicy

func (mgr *RESTService) DeleteRolePolicy(w http.ResponseWriter, r *http.Request)

func (*RESTService) DeleteService

func (mgr *RESTService) DeleteService(w http.ResponseWriter, r *http.Request)

func (*RESTService) DeleteServices

func (mgr *RESTService) DeleteServices(w http.ResponseWriter, r *http.Request)

func (*RESTService) GetAllDiscoverRequests

func (e *RESTService) GetAllDiscoverRequests(w http.ResponseWriter, r *http.Request)

func (*RESTService) GetDiscoverPolicies

func (e *RESTService) GetDiscoverPolicies(w http.ResponseWriter, r *http.Request)

func (*RESTService) GetDiscoverRequests

func (e *RESTService) GetDiscoverRequests(w http.ResponseWriter, r *http.Request)

func (*RESTService) GetFunction

func (mgr *RESTService) GetFunction(w http.ResponseWriter, r *http.Request)

func (*RESTService) GetPolicy

func (mgr *RESTService) GetPolicy(w http.ResponseWriter, r *http.Request)

func (*RESTService) GetRolePolicy

func (mgr *RESTService) GetRolePolicy(w http.ResponseWriter, r *http.Request)

func (*RESTService) GetService

func (mgr *RESTService) GetService(w http.ResponseWriter, r *http.Request)

func (*RESTService) ListFunctions

func (mgr *RESTService) ListFunctions(w http.ResponseWriter, r *http.Request)

func (*RESTService) ListPolicies

func (mgr *RESTService) ListPolicies(w http.ResponseWriter, r *http.Request)

func (*RESTService) ListPolicyAndRolePolicyCounts

func (mgr *RESTService) ListPolicyAndRolePolicyCounts(w http.ResponseWriter, r *http.Request)

func (*RESTService) ListRolePolicies

func (mgr *RESTService) ListRolePolicies(w http.ResponseWriter, r *http.Request)

func (*RESTService) ListServices

func (mgr *RESTService) ListServices(w http.ResponseWriter, r *http.Request)

func (*RESTService) ResetAllDiscoverRequests

func (e *RESTService) ResetAllDiscoverRequests(w http.ResponseWriter, r *http.Request)

func (*RESTService) ResetDiscoverRequests

func (e *RESTService) ResetDiscoverRequests(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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