permissions

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Code generated discover.go. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServices

func GetServices() []string

Types

type Admin

type Admin struct {
	// TODO map from string to bool would be better
	// maybe map[string][]string where key is method and values is slice of roles like
	// "v1.SampleService/Get": ["editor", "viewer"]
	Editor []string `json:"editor,omitempty"`
	Viewer []string `json:"viewer,omitempty"`
}

type Auditable

type Auditable map[string]bool

type Chargeable

type Chargeable map[string]bool

type Methods

type Methods map[string]bool

type Project

type Project struct {
	// TODO same as above
	Owner  []string `json:"owner,omitempty"`
	Editor []string `json:"editor,omitempty"`
	Viewer []string `json:"viewer,omitempty"`
}

type Roles

type Roles struct {
	Admin   *Admin   `json:"admin,omitempty"`
	Tenant  *Tenant  `json:"tenant,omitempty"`
	Project *Project `json:"project,omitempty"`
}

Roles

type ServicePermissions

type ServicePermissions struct {
	Roles      Roles      `json:"roles"`
	Methods    Methods    `json:"methods"`
	Visibility Visibility `json:"visibility"`
	Chargeable Chargeable `json:"chargeable,omitempty"`
	Auditable  Auditable  `json:"auditable,omitempty"`
	Services   []string   `json:"services,omitempty"`
}

func GetServicePermissions

func GetServicePermissions() *ServicePermissions

type Tenant

type Tenant struct {
	// TODO same as above
	Owner  []string `json:"owner,omitempty"`
	Editor []string `json:"editor,omitempty"`
	Viewer []string `json:"viewer,omitempty"`
}

type Visibility

type Visibility struct {
	Public  map[string]bool `json:"public,omitempty"`
	Private map[string]bool `json:"private,omitempty"`
	Self    map[string]bool `json:"self,omitempty"`
}

Jump to

Keyboard shortcuts

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