permissions

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 1 Imported by: 0

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