scopes

package
v0.0.0-...-dae269f Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package scopes implements and provides scopes used by the API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminLoggedIn

type AdminLoggedIn struct {
	component.Base
	Dependencies struct {
		Auth *auth.Auth
	}
}

func (*AdminLoggedIn) HasScope

func (al *AdminLoggedIn) HasScope(param string, r *http.Request) (bool, error)

func (*AdminLoggedIn) Scope

type ListInstancesScope

type ListInstancesScope struct {
	component.Base
	Dependencies struct {
		Auth *auth.Auth
	}
}

func (*ListInstancesScope) HasScope

func (lis *ListInstancesScope) HasScope(param string, r *http.Request) (bool, error)

func (*ListInstancesScope) Scope

type ListNewsScope

type ListNewsScope struct {
	component.Base
	Dependencies struct {
		Auth *auth.Auth
	}
}

func (*ListNewsScope) HasScope

func (lns *ListNewsScope) HasScope(param string, r *http.Request) (bool, error)

func (*ListNewsScope) Scope

type Never

type Never struct {
	component.Base
	Dependencies struct {
		Auth *auth.Auth
	}
}

func (*Never) HasScope

func (*Never) HasScope(string, *http.Request) (bool, error)

func (*Never) Scope

func (*Never) Scope() component.ScopeInfo

type ResolverScope

type ResolverScope struct {
	component.Base
	Dependencies struct {
		Auth *auth.Auth
	}
}

func (*ResolverScope) HasScope

func (rs *ResolverScope) HasScope(param string, r *http.Request) (bool, error)

func (*ResolverScope) Scope

type Scope

type Scope = component.Scope
const (
	ScopeInstanceDirectory Scope = "instances.directory"
)
const (
	ScopeListNews Scope = "news.list"
)
const (
	ScopeNever Scope = "never"
)
const (
	ScopeResolver Scope = "url.resolve"
)
const (
	ScopeUserAdmin Scope = "user.admin"
)
const (
	ScopeUserValid Scope = "user.valid"
)

type UserLoggedIn

type UserLoggedIn struct {
	component.Base
	Dependencies struct {
		Auth *auth.Auth
	}
}

func (*UserLoggedIn) HasScope

func (iu *UserLoggedIn) HasScope(param string, r *http.Request) (bool, error)

func (*UserLoggedIn) Scope

func (*UserLoggedIn) Scope() component.ScopeInfo

Jump to

Keyboard shortcuts

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