api

package
v0.0.0-...-44ea9c2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(mux *http.ServeMux, api *API)

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func New

func New(db *sql.DB) *API

func (*API) UserCheckPermission

func (s *API) UserCheckPermission(ctx context.Context, kthID, system string, permission string) (bool, error)

func (*API) UserGetPermissions

func (s *API) UserGetPermissions(ctx context.Context, kthID, system string) ([]Permission, error)

func (*API) UserGetScopes

func (s *API) UserGetScopes(ctx context.Context, kthID, system string, permission string) ([]string, error)

type Permission

type Permission struct {
	PermissionID string   `json:"permission"`
	Scopes       []string `json:"scopes,omitempty"`
}

Jump to

Keyboard shortcuts

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