client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 34

Documentation

Index

Constants

View Source
const InternalAdminToken = `` /* 727-byte string literal not displayed */

Variables

This section is empty.

Functions

func NewTokenProvider

func NewTokenProvider(authEndpoint string, authClientId string, authClientSecret string) func() (string, error)

func NewUserTokenProvider

func NewUserTokenProvider(authEndpoint string, authClientId string, authClientSecret string, userName string, pw string) func() (string, error)

Types

type Client

type Client interface {
	api.Controller
}

func New

func New(serverUrl string) (client Client)

func NewTestClient

func NewTestClient(ctx context.Context) (client Client, err error)

type Impl

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

func (*Impl) CheckMultiplePermissions

func (this *Impl) CheckMultiplePermissions(token string, topicId string, ids []string, permissions string) (access map[string]bool, err error, code int)

func (*Impl) CheckPermission

func (this *Impl) CheckPermission(token string, topicId string, id string, permissions string) (access bool, err error, code int)

func (*Impl) GetResource

func (this *Impl) GetResource(token string, topicId string, id string) (result model.Resource, err error, code int)

func (*Impl) GetTopic

func (this *Impl) GetTopic(token string, id string) (result model.Topic, err error, code int)

func (*Impl) ListAccessibleResourceIds

func (this *Impl) ListAccessibleResourceIds(token string, topicId string, permissions string, options model.ListOptions) (ids []string, err error, code int)

func (*Impl) ListResourcesWithAdminPermission

func (this *Impl) ListResourcesWithAdminPermission(token string, topicId string, options model.ListOptions) (result []model.Resource, err error, code int)

func (*Impl) ListTopics

func (this *Impl) ListTopics(token string, options model.ListOptions) (result []model.Topic, err error, code int)

func (*Impl) RemoveTopic

func (this *Impl) RemoveTopic(token string, id string) (err error, code int)

func (*Impl) SetPermission

func (this *Impl) SetPermission(token string, topicId string, id string, permissions model.ResourcePermissions, options model.SetPermissionOptions) (result model.ResourcePermissions, err error, code int)

func (*Impl) SetTopic

func (this *Impl) SetTopic(token string, topic model.Topic) (result model.Topic, err error, code int)

type OpenidToken

type OpenidToken struct {
	AccessToken      string    `json:"access_token"`
	ExpiresIn        float64   `json:"expires_in"`
	RefreshExpiresIn float64   `json:"refresh_expires_in"`
	RefreshToken     string    `json:"refresh_token"`
	TokenType        string    `json:"token_type"`
	RequestTime      time.Time `json:"-"`
}

Jump to

Keyboard shortcuts

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