accessmap

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MPL-2.0, MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store accessMapAdapter

Store is the package state variable which contains database connections

Functions

func AllAddedUserGroups

func AllAddedUserGroups(w http.ResponseWriter, r *http.Request)

func CreateDynamicAccessMap

func CreateDynamicAccessMap(serviceID, userID, userEmail, privilege, orgID string) (*models.Policy, error)

func CreateDynamicService

func CreateDynamicService(hostname, serviceType, userID, userEmail, privilege, orgID string) (*models.Service, error)

func CreateServiceGroupUserGroupMap

func CreateServiceGroupUserGroupMap(w http.ResponseWriter, r *http.Request)

func CreateServiceUserMap

func CreateServiceUserMap(w http.ResponseWriter, r *http.Request)

func DeleteServiceGroupUserGroupMap

func DeleteServiceGroupUserGroupMap(w http.ResponseWriter, r *http.Request)

func DeleteServiceUserMap

func DeleteServiceUserMap(w http.ResponseWriter, r *http.Request)

func GetUserAccessMaps

func GetUserAccessMaps(w http.ResponseWriter, r *http.Request)

func GetUserGroupServiceGroupAccessMaps

func GetUserGroupServiceGroupAccessMaps(w http.ResponseWriter, r *http.Request)

func GetUserGroupsAssignedToServiceGroups

func GetUserGroupsAssignedToServiceGroups(w http.ResponseWriter, r *http.Request)

func InitStore

func InitStore(state *global.State)

InitStore initialises package state

func InitStoreMock

func InitStoreMock() *accessmapMock

InitStoreMock will init mock state of this package

func UpdateServiceGroupUserGroup

func UpdateServiceGroupUserGroup(w http.ResponseWriter, r *http.Request)

func UpdateServiceUserMap

func UpdateServiceUserMap(w http.ResponseWriter, r *http.Request)

func UserGroupsToAdd

func UserGroupsToAdd(w http.ResponseWriter, r *http.Request)

Types

type AssignUserToApp

type AssignUserToApp struct {
	ServiceID string   `json:"serviceID"`
	OrgID     string   `json:"orgID"`
	Privilege string   `json:"privilege"`
	Users     []string `json:"users"`
	PolicyID  []string `json:"policyID"`
}

type DeleteServiceUserMapReq

type DeleteServiceUserMapReq struct {
	MapIDs []string `json:"mapIDs"`
}

type RmGroupMap

type RmGroupMap struct {
	MapID []string `json:"mapID"`
}

type ServiceGroupUserGroupMapRequest

type ServiceGroupUserGroupMapRequest struct {
	MapID          string   `json:"mapID"`
	ServiceGroupID string   `json:"serviceGroupID"`
	MapType        string   `json:"mapType"`
	UserGroupID    []string `json:"userGroupID"`
	Privilege      string   `json:"privilege"`
	OrgID          string   `json:"orgID"`
	PolicyID       []string `json:"policyID"`
	CreatedAt      int64    `json:"createdAt"`
}

type UpdatePrivilege

type UpdatePrivilege struct {
	MapID     string `json:"mapID"`
	Privilege string `json:"privilege"`
}

type UserGroupOfServiceGroup

type UserGroupOfServiceGroup struct {
	MapID         string `json:"mapID"`
	UsergroupID   string `json:"usergroupID"`
	UsergroupName string `json:"userGroupName"`
	Privilege     string `json:"privilege"`
	PolicyName    string `json:"policyName"`
	PolicyID      string `json:"policyID"`
	AddedAt       int64  `json:"addedAt"`
}

Jump to

Keyboard shortcuts

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