ctrl

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BatchSize = 100

Functions

func Contains

func Contains(s []string, e string) bool

func DeleteAnalyticsFlowEngineUser

func DeleteAnalyticsFlowEngineUser(token Token, conf configuration.Config) error

func DeleteAnalyticsFlowRepoUser

func DeleteAnalyticsFlowRepoUser(token Token, conf configuration.Config) error

func DeleteAnalyticsOperatorRepoUser

func DeleteAnalyticsOperatorRepoUser(token Token, conf configuration.Config) error

func DeleteBrokerExportsUser

func DeleteBrokerExportsUser(token Token, conf configuration.Config) error

func DeleteDashboardUser

func DeleteDashboardUser(token Token, conf configuration.Config) error

func DeleteDatabaseExportsUser

func DeleteDatabaseExportsUser(token Token, conf configuration.Config) error

func DeleteExportDatabasesUser

func DeleteExportDatabasesUser(token Token, conf configuration.Config) error

func DeleteImportsUser

func DeleteImportsUser(token Token, conf configuration.Config) error

func DeleteKeycloakUser

func DeleteKeycloakUser(id string, conf configuration.Config) (err error)

func DeleteNotificationUser

func DeleteNotificationUser(token Token, conf configuration.Config) error

func DeleteProcessSchedulerUser

func DeleteProcessSchedulerUser(token Token, conf configuration.Config) error

func DeleteUser

func DeleteUser(userId string, conf configuration.Config) (err error)

func DeleteWaitingRoomUser

func DeleteWaitingRoomUser(token Token, conf configuration.Config) error

Types

type BrokerList

type BrokerList struct {
	Brokers []IdWrapper `json:"brokers"`
}

type EventHandler

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

func InitEventConn

func InitEventConn(ctx context.Context, wg *sync.WaitGroup, conf configuration.Config) (handler *EventHandler, err error)

func (*EventHandler) DeleteUser

func (handler *EventHandler) DeleteUser(id string) error

type ExportDatabase

type ExportDatabase struct {
	ID            string `gorm:"primary_key;type:varchar(255);column:id"`
	Name          string `gorm:"type:varchar(255)"`
	Description   string `gorm:"type:varchar(255)"`
	Type          string `gorm:"type:varchar(255)"`
	Deployment    string `gorm:"type:varchar(255)"`
	Url           string `gorm:"type:varchar(255)"`
	EwFilterTopic string `gorm:"type:varchar(255)"`
	UserId        string `gorm:"type:varchar(255)"`
	Public        bool   `gorm:"type:bool;DEFAULT:false"`
}

type ExportDatabaseRequest

type ExportDatabaseRequest struct {
	Name          string `json:"Name" validate:"required"`
	Description   string `json:"Description"`
	Type          string `json:"Type" validate:"required"`
	Deployment    string `json:"deployment" validate:"required"`
	Url           string `json:"Url" validate:"required"`
	EwFilterTopic string `json:"EwFilterTopic" validate:"required"`
	Public        bool   `json:"Public"`
}

type ExportIdWrapper

type ExportIdWrapper struct {
	Id string `json:"ID"`
}

type ExportListIdWrapper

type ExportListIdWrapper struct {
	Instances []ExportIdWrapper `json:"instances"`
}

type Flow

type Flow struct {
	UnderscoreIdWrapper
	UserId string `json:"userId"`
}

type FlowList

type FlowList struct {
	Flows []Flow `json:"flows"`
}

type Group added in v0.0.5

type Group struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Path string `json:"path"`
}

func GetUsersGroups added in v0.0.5

func GetUsersGroups(id string, conf configuration.Config) ([]Group, error)

type IdWrapper

type IdWrapper struct {
	Id string `json:"id"`
}

type JwtImpersonate

type JwtImpersonate struct {
	Token   string
	XUserId string
}

func EnsureAccess

func EnsureAccess(conf configuration.Config) (token JwtImpersonate, err error)

func (JwtImpersonate) Delete

func (this JwtImpersonate) Delete(url string, body interface{}) (resp *http.Response, err error)

func (JwtImpersonate) DeleteWithBody

func (this JwtImpersonate) DeleteWithBody(url string, body interface{}) (resp *http.Response, err error)

func (JwtImpersonate) Get

func (this JwtImpersonate) Get(url string) (resp *http.Response, err error)

func (JwtImpersonate) GetJSON

func (this JwtImpersonate) GetJSON(url string, result interface{}) (err error)

func (JwtImpersonate) Post

func (this JwtImpersonate) Post(url string, contentType string, body io.Reader) (resp *http.Response, err error)

func (JwtImpersonate) PostJSON

func (this JwtImpersonate) PostJSON(url string, body interface{}, result interface{}) (err error)

func (JwtImpersonate) Put

func (this JwtImpersonate) Put(url string, contentType string, body io.Reader) (resp *http.Response, err error)

func (JwtImpersonate) PutJSON

func (this JwtImpersonate) PutJSON(url string, body interface{}, result interface{}) (err error)

type KeycloakClaims

type KeycloakClaims struct {
	RealmAccess RealmAccess `json:"realm_access"`
	jwt.StandardClaims
}

type NotificationList

type NotificationList struct {
	Notifications []UnderscoreIdWrapper `json:"notifications"`
}

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:"-"`
}

type Operator

type Operator struct {
	UnderscoreIdWrapper
	Public bool   `json:"pub"`
	UserId string `json:"userId"`
}

type OperatorList

type OperatorList struct {
	Operators []Operator `json:"operators"`
}

type RealmAccess

type RealmAccess struct {
	Roles []string `json:"roles"`
}

type Role

type Role struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Composite   bool   `json:"composite"`
	ClientRole  bool   `json:"clientRole"`
	ContainerId string `json:"containerId"`
}

type Token

type Token struct {
	Token       string      `json:"-"`
	Sub         string      `json:"sub,omitempty"`
	RealmAccess RealmAccess `json:"realm_access,omitempty"`
}

func CreateToken

func CreateToken(issuer string, userId string) (token Token, err error)

func CreateTokenWithRoles

func CreateTokenWithRoles(issuer string, userId string, roles []string) (token Token, err error)

func (*Token) GetUserId

func (this *Token) GetUserId() string

func (*Token) Impersonate

func (this *Token) Impersonate() JwtImpersonate

func (*Token) IsAdmin

func (this *Token) IsAdmin() bool

type UnderscoreIdWrapper

type UnderscoreIdWrapper struct {
	Id string `json:"_id"`
}

type User

type User struct {
	Id         string                 `json:"id"`
	Name       string                 `json:"username"`
	Attributes map[string]interface{} `json:"attributes"`
}

func GetGroupMembersCombined added in v0.0.5

func GetGroupMembersCombined(groups []Group, excludeID string, conf configuration.Config) ([]User, error)

func GetUserById

func GetUserById(id string, conf configuration.Config) (user User, err error)

func GetUsers added in v0.0.5

func GetUsers(excludeID string, conf configuration.Config) ([]User, error)

type UserCommandMsg

type UserCommandMsg struct {
	Command string `json:"command"`
	Id      string `json:"id"`
}

type WaitingRoomIdWrapper

type WaitingRoomIdWrapper struct {
	Id string `json:"local_id"`
}

type WaitingRoomListIdWrapper

type WaitingRoomListIdWrapper struct {
	Result []WaitingRoomIdWrapper `json:"result"`
}

Jump to

Keyboard shortcuts

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