user

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package user provides the UserAPI that wraps the generated v1 client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateParams

type CreateParams struct {
	Name        string
	Password    string
	Code        string
	Description string
	Email       *string
}

type ListParams

type ListParams struct {
	Page     *int
	PerPage  *int
	Ordering *v1.CompatUsersGetOrdering
}

type UpdateParams

type UpdateParams struct {
	Name        string
	Password    *string
	Description string
}

type UserAPI

type UserAPI interface {
	List(ctx context.Context, params ListParams) (*v1.CompatUsersGetOK, error)
	Create(ctx context.Context, params CreateParams) (*v1.User, error)
	Read(ctx context.Context, id int) (*v1.User, error)
	Update(ctx context.Context, id int, params UpdateParams) (*v1.User, error)
	Delete(ctx context.Context, id int) error

	RegisterEmail(ctx context.Context, userID int, email string) error
	UnregisterEmail(ctx context.Context, userID int) error
}

UserAPI is the interface for user operations.

func NewUserOp

func NewUserOp(client *v1.Client) UserAPI

Jump to

Keyboard shortcuts

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