controllers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiController

type ApiController interface {
	CreateUser(*models.CreateUserViewModel) error
	Ping(int, time.Duration, bool) error
	UpdatePermissions(*models.UpdatePermissionsViewModel) error
}

func NewSdkApiController

func NewSdkApiController(serverUrl *url.URL, debug bool, credentials *models.UserCredentials) (c ApiController)

type ConfigController

type ConfigController interface {
	IsSet(string) bool
	GetString(string) string
}

func NewViperConfigController

func NewViperConfigController(cfgFile string, verbose bool) ConfigController

type NewApiController

type NewApiController func(*url.URL, bool, *models.UserCredentials) ApiController

type NewConfigController

type NewConfigController func(string, bool) ConfigController

type RocketChatClient

type RocketChatClient interface {
	Login(credentials *models.UserCredentials) error
	CreateUser(req *models.CreateUserRequest) (*rest.CreateUserResponse, error)
	UpdatePermissions(req *rest.UpdatePermissionsRequest) (*rest.UpdatePermissionsResponse, error)
}

type SdkApiController

type SdkApiController struct {
	Client      RocketChatClient
	Credentials *sdkModels.UserCredentials
}

func (*SdkApiController) CreateUser

func (c *SdkApiController) CreateUser(model *models.CreateUserViewModel) (err error)

func (*SdkApiController) Ping

func (c *SdkApiController) Ping(maxAttempts int, waitTime time.Duration, verbose bool) error

func (*SdkApiController) UpdatePermissions

func (c *SdkApiController) UpdatePermissions(model *models.UpdatePermissionsViewModel) (err error)

Jump to

Keyboard shortcuts

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