admin

package
v0.0.0-...-bde9636 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package admin provides ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLicense

func CreateLicense(handler gorexos.RequestHandler, r io.Reader) error

CreateLicense creates a new REX license where the license is provided by a JSON file reader

func DeleteLicense

func DeleteLicense(handler gorexos.RequestHandler, urn string) error

DeleteLicense deletes a REX license permanently!

Types

type License

type License struct {
	DateCreated    string        `json:"dateCreated" example:"2019-07-09T13:03:57.557+0000"`
	LastUpdated    string        `json:"lastUpdated" example:"2019-07-09T13:03:57.557+0000"`
	Key            string        `json:"key" example:"rex-addon-positioning-tags-20"`
	Name           string        `json:"name" example:"20 positioning tags"`
	Description    string        `json:"description" example:"addon sample description"`
	ExpirationDate string        `json:"expirationDate" example:"2019-07-09T13:03:57.557+0000"`
	Active         bool          `json:"active"`
	DefaultLicense bool          `json:"defaultLicense"`
	Urn            string        `json:"urn" example:"robotic-eyes:license:1101"`
	LicenseItems   []LicenseItem `json:"licenseItems"`
}

License is a container for licenses

func GetLicenses

func GetLicenses(handler gorexos.RequestHandler) ([]License, error)

GetLicenses gets all the available licenses

type LicenseItem

type LicenseItem struct {
	DateCreated  string  `json:"dateCreated" example:"2019-07-09T13:03:57.575+0000"`
	LastUpdated  string  `json:"lastUpdated" example:"2019-07-09T13:03:57.575+0000"`
	Key          string  `json:"key" example:"positionProjectFileBudget"`
	ValueString  string  `json:"valueString"`
	ValueLong    int64   `json:"valueLong" example:"20"`
	ValueDouble  float64 `json:"valueDouble"`
	ValueBoolean bool    `json:"valueBoolean"`
	ValueDate    string  `json:"valueDate"`
	Urn          string  `json:"urn" example:"robotic-eyes:license-item:1102"`
}

LicenseItem is a container for license items

type LicensesResponse

type LicensesResponse struct {
	Page struct {
		Size          int `json:"size"`
		TotalElements int `json:"totalElements"`
		TotalPages    int `json:"totalPages"`
		Number        int `json:"number"`
	} `json:"page"`
	Licenses []License `json:"licenses"`
}

type User

type User struct {
	FirstName   string `json:"firstName"`
	LastName    string `json:"lastName"`
	Email       string `json:"email"`
	Locked      bool   `json:"locked"`
	Disabled    bool   `json:"disabled"`
	DateCreated string `json:"dateCreated"`
	LastUpdated string `json:"lastUpdated"`
	LastLogin   string `json:"lastLogin"`
	Urn         string `json:"urn"`
}

func FindUsers

func FindUsers(handler gorexos.RequestHandler, partialNameOrEmail string) ([]User, error)

func GetUsers

func GetUsers(handler gorexos.RequestHandler) ([]User, error)

type UserDetail

type UserDetail struct {
	Urn                           string `json:"urn"`
	Address                       string `json:"address"`
	City                          string `json:"city"`
	Company                       string `json:"company"`
	Country                       string `json:"country"`
	Countryname                   string `json:"countryname"`
	DateCreated                   string `json:"dateCreated"`
	Disabled                      bool   `json:"disabled"`
	Email                         string `json:"email"`
	FirstName                     string `json:"firstName"`
	LastLogin                     string `json:"lastLogin"`
	LastName                      string `json:"lastName"`
	LastUpdated                   string `json:"lastUpdated"`
	Locked                        bool   `json:"locked"`
	MaxNumberOfProjects           int    `json:"maxNumberOfProjects"`
	MaxNumberOfPublicShareActions int    `json:"maxNumberOfPublicShareActions"`
	MaxTotalUsedDiskSpace         int    `json:"maxTotalUsedDiskSpace"`
	NumberOfProjects              int    `json:"numberOfProjects"`
	NumberOfPublicShareActions    int    `json:"numberOfPublicShareActions"`
	State                         string `json:"state"`
	TotalUsedDiskSpace            int    `json:"totalUsedDiskSpace"`
	UserID                        string `json:"userID"`
	Zip                           string `json:"zip"`
	Subscriptions                 []struct {
		ActivationDate string `json:"activationDate"`
		ExpirationDate string `json:"expirationDate"`
		Name           string `json:"name"`
		Urn            string `json:"urn"`
	} `json:"subscriptions"`
}

func GetUserDetails

func GetUserDetails(handler gorexos.RequestHandler, urn string) (UserDetail, error)

type UsersResponse

type UsersResponse struct {
	Page struct {
		Size          int `json:"size"`
		TotalElements int `json:"totalElements"`
		TotalPages    int `json:"totalPages"`
		Number        int `json:"number"`
	} `json:"page"`
	Users []User `json:"users"`
}

Jump to

Keyboard shortcuts

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