client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient struct {
	Username    string
	Password    string
	ClusterHost string
	APIPort     string
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, redisClient *RedisClient) (*RedisClient, error)

func NewClient

func NewClient(username, password, clusterHost, apiPort string, httpClient ...*uhttp.BaseHttpClient) *RedisClient

func (*RedisClient) GetRoleDetails

func (c *RedisClient) GetRoleDetails(ctx context.Context, roleUID string) (Role, annotations.Annotations, error)

func (*RedisClient) ListRoles

func (c *RedisClient) ListRoles(ctx context.Context) ([]Role, annotations.Annotations, error)

func (*RedisClient) ListUsers

func (c *RedisClient) ListUsers(ctx context.Context) ([]User, annotations.Annotations, error)

type Role

type Role struct {
	Management string `json:"management"`
	Name       string `json:"name"`
	UID        int    `json:"uid"`
}

type User

type User struct {
	AuthMethod             string        `json:"auth_method"`
	BdbsEmailAlerts        []interface{} `json:"bdbs_email_alerts"`
	CertificateSubjectLine string        `json:"certificate_subject_line"`
	ClusterEmailAlerts     bool          `json:"cluster_email_alerts"`
	Email                  string        `json:"email"`
	EmailAlerts            bool          `json:"email_alerts"`
	Name                   string        `json:"name"`
	PasswordIssueDate      time.Time     `json:"password_issue_date"`
	Role                   string        `json:"role"`
	RoleUIDs               []int         `json:"role_uids"`
	Status                 string        `json:"status"`
	UID                    int           `json:"uid"`
}

Jump to

Keyboard shortcuts

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