ombi

package module
v0.0.0-...-11eae03 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotifAgentDiscord  = 1
	NotifAgentTelegram = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationPref

type NotificationPref struct {
	Agent   int    `json:"agent"`
	UserID  string `json:"userId"`
	Value   string `json:"value"`
	Enabled bool   `json:"enabled"`
}

type Ombi

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

Ombi represents a running Ombi instance.

func NewOmbi

func NewOmbi(server, key string, timeoutHandler common.TimeoutHandler) *Ombi

NewOmbi returns an Ombi object.

func (*Ombi) DeleteUser

func (ombi *Ombi) DeleteUser(id string) (code int, err error)

DeleteUser deletes the user corresponding to the given ID.

func (*Ombi) GetUsers

func (ombi *Ombi) GetUsers() ([]map[string]interface{}, int, error)

GetUsers returns all users on the Ombi instance.

func (*Ombi) ModifyUser

func (ombi *Ombi) ModifyUser(user map[string]interface{}) (status int, err error)

ModifyUser applies the given modified user object to the corresponding user.

func (*Ombi) NewUser

func (ombi *Ombi) NewUser(username, password, email string, template map[string]interface{}) ([]string, int, error)

NewUser creates a new user with the given username, password and email address.

func (*Ombi) SetNotificationPrefs

func (ombi *Ombi) SetNotificationPrefs(user map[string]interface{}, discordID, telegramUser string) (result string, code int, err error)

func (*Ombi) TemplateByID

func (ombi *Ombi) TemplateByID(id string) (result map[string]interface{}, code int, err error)

TemplateByID returns a template based on the user corresponding to the provided ID's settings.

func (*Ombi) UserByID

func (ombi *Ombi) UserByID(id string) (result map[string]interface{}, code int, err error)

UserByID returns the user corresponding to the provided ID.

Jump to

Keyboard shortcuts

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