examples

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExampleController

func NewExampleController(svc *ExampleService) web.Controller

Types

type ExampleController

type ExampleController struct {
	Service *ExampleService
}

func (*ExampleController) Mappings

func (c *ExampleController) Mappings() []web.Mapping

func (*ExampleController) Remote

func (c *ExampleController) Remote(ctx context.Context, req *ExampleRequest) (interface{}, error)

type ExampleRequest

type ExampleRequest struct {
	UseSystemAccount bool   `json:"sysAcct" form:"sys_acct"`
	Username         string `json:"user" form:"user"`
}

type ExampleService

type ExampleService struct {
	HttpClient httpclient.Client
}

func NewExampleService

func NewExampleService(client httpclient.Client) (*ExampleService, error)

func (*ExampleService) CallRemoteWithCurrentContext

func (s *ExampleService) CallRemoteWithCurrentContext(ctx context.Context) (ret interface{}, err error)

CallRemoteWithCurrentContext make remote HTTP call using current security context

func (*ExampleService) CallRemoteWithSystemAccount

func (s *ExampleService) CallRemoteWithSystemAccount(ctx context.Context, username string) (ret interface{}, err error)

CallRemoteWithSystemAccount switch to given username using system account and make remote HTTP call

func (*ExampleService) CallRemoteWithoutSystemAccount

func (s *ExampleService) CallRemoteWithoutSystemAccount(ctx context.Context, username string) (ret interface{}, err error)

CallRemoteWithoutSystemAccount switch to given username directly and make remote HTTP call

Jump to

Keyboard shortcuts

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