middleware

package
v1.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextAccountAuth

type ContextAccountAuth struct {
	httpx.MethodGet
}

func (*ContextAccountAuth) ContextKey

func (r *ContextAccountAuth) ContextKey() string

func (*ContextAccountAuth) Output

func (r *ContextAccountAuth) Output(ctx context.Context) (interface{}, error)

type CurrentAccount

type CurrentAccount struct {
	models.Account
}

func CurrentAccountFromContext

func CurrentAccountFromContext(ctx context.Context) *CurrentAccount

func (*CurrentAccount) ValidateProjectPerm

func (v *CurrentAccount) ValidateProjectPerm(ctx context.Context, prjID types.SFID) (*models.Project, error)

ValidateProjectPerm Deprecated: Use WithProjectContextByID instead

func (*CurrentAccount) ValidateProjectPermByPrjName

func (v *CurrentAccount) ValidateProjectPermByPrjName(ctx context.Context, projectName string) (*models.Project, error)

ValidateProjectPermByPrjName Deprecated: Use WithProjectContextByName instead

func (*CurrentAccount) WithAppletContext

func (v *CurrentAccount) WithAppletContext(ctx context.Context, appletID types.SFID) (context.Context, error)

func (*CurrentAccount) WithInstanceContext

func (v *CurrentAccount) WithInstanceContext(ctx context.Context, instanceID types.SFID) (context.Context, error)

func (*CurrentAccount) WithProjectContextByID

func (v *CurrentAccount) WithProjectContextByID(ctx context.Context, prjID types.SFID) (context.Context, error)

func (*CurrentAccount) WithProjectContextByName

func (v *CurrentAccount) WithProjectContextByName(ctx context.Context, prjName string) (context.Context, error)

func (*CurrentAccount) WithResourceContext added in v1.0.0

func (v *CurrentAccount) WithResourceContext(ctx context.Context, resID types.SFID) (context.Context, error)

Jump to

Keyboard shortcuts

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