Snipeit
Explore the following sections to learn more:
snipeit
import "github.com/gemini-oss/rego/pkg/snipeit"
pkg/snipeit/accessories.go
pkg/snipeit/assets.go
pkg/snipeit/entities.go
pkg/snipeit/accessories.go
pkg/snipeit/snipeit.go
Index
- Constants
- Variables
- type Accessory
- type AccessoryClient
- type AccessoryList
- type AccessoryQuery
- type AssetClient
- func (c *AssetClient) CreateAsset(p *Hardware) (*Hardware, error)
- func (c *AssetClient) DeleteAsset(id int) (string, error)
- func (c *AssetClient) GetAllAssets() (*HardwareList, error)
- func (c *AssetClient) GetAssetBySerial(serial string) (*HardwareList, error)
- func (c *AssetClient) PartialUpdateAsset(id int, p *Hardware) (*Hardware, error)
- type AssetQuery
- type AvailableActions
- type Category
- type CategoryList
- type Client
- func NewClient(verbosity int) *Client
- func (c *Client) Accessories() *AccessoryClient
- func (c *Client) Assets() *AssetClient
- func (c *Client) BuildURL(endpoint string, identifiers …interface{}) string
- func (c *Client) GetCache(key string, target interface{}) bool
- func (c *Client) Locations() *LocationClient
- func (c *Client) SetCache(key string, value interface{}, duration time.Duration)
- type CustomAssetFields
- type CustomFields
- type DateInfo
- type Hardware
- type HardwareList
- type Location
- type LocationClient
- func (c *LocationClient) CreateLocation(p *Location) (*Location, error)
- func (c *LocationClient) DeleteLocation(id int) error
- func (c *LocationClient) GetAllLocations() (*LocationList, error)
- func (c *LocationClient) GetLocation(id int) (*Location, error)
- func (c *LocationClient) PartialUpdateLocation(id int, p *Location) (*Location, error)
- func (c *LocationClient) UpdateLocation(id int, p *Location) (*Location, error)
- type LocationList
- type LocationQuery
- type PaginatedList
- type PaginatedResponse
- type QueryInterface
- type Record
- type SnipeITResponse
- type StatusLabel
- type User
- type UserList
Constants
const (
Assets = "%s/hardware" // https://snipe-it.readme.io/reference#hardware
Fields = "%s/fields" // https://snipe-it.readme.io/reference/fields-1
FieldSets = "%s/fieldsets" // https://snipe-it.readme.io/reference/fieldsets
Companies = "%s/companies" // https://snipe-it.readme.io/reference#companies
Locations = "%s/locations" // https://snipe-it.readme.io/reference#locations
Accessories = "%s/accessories" // https://snipe-it.readme.io/reference#accessories
Consumables = "%s/consumables" // https://snipe-it.readme.io/reference#consumables
Components = "%s/components" // https://snipe-it.readme.io/reference#components
Users = "%s/users" // https://snipe-it.readme.io/reference#users
StatusLabels = "%s/statuslabels" // https://snipe-it.readme.io/reference#status-labels
Models = "%s/models" // https://snipe-it.readme.io/reference#models
Licenses = "%s/licenses" // https://snipe-it.readme.io/reference#licenses
Categories = "%s/categories" // https://snipe-it.readme.io/reference#categories
Manufacturers = "%s/manufacturers" // https://snipe-it.readme.io/reference#manufacturers
Suppliers = "%s/suppliers" // https://snipe-it.readme.io/reference#suppliers
AssetMaintenance = "%s/hardware/maintenance" // https://snipe-it.readme.io/reference#maintenances
Departments = "%s/departments" // https://snipe-it.readme.io/reference#departments
Groups = "%s/groups" // https://snipe-it.readme.io/reference#groups
Settings = "%s/settings" // https://snipe-it.readme.io/reference#settings
Reports = "%s/reports" // https://snipe-it.readme.io/reference#reports
)
Variables
var (
BaseURL = fmt.Sprintf("https://%s/api/v1", "%s") // https://snipe-it.readme.io/reference/api-overview
)
type Accessory
Accessory represents an individual accessory. https://snipe-it.readme.io/reference/accessories#sortable-columns
type Accessory struct {
AvailableActions *AvailableActions `json:"available_actions,omitempty"` // Actions that are available for the row
Category *Record `json:"category,omitempty"` // Name and ID of the accessory's category
Company string `json:"company,omitempty"` // Company associated with the accessory, if applicable.
CreatedAt *DateInfo `json:"created_at,omitempty"` // When the accessory was created
ID int `json:"id,omitempty"` // Asset ID
Image string `json:"image,omitempty"` // URL of the accessory's image
Location *Record `json:"location,omitempty"` // Name and ID of the accessory's location
Manufacturer *Record `json:"manufacturer,omitempty"` // Name and ID of the accessory's manufacturer
MinQty int `json:"min_qty,omitempty"` // Minimum quantity of the accessory
ModelNumber string `json:"model_number,omitempty"` // Model number of the accessory
Name string `json:"name,omitempty"` // Asset Name
Notes string `json:"notes,omitempty"` // Notes about the accessory
OrderNumber string `json:"order_number,omitempty"` // Order number associated with the accessory
PurchaseCost string `json:"purchase_cost,omitempty"` // Purchase cost of the accessory
PurchaseDate string `json:"purchase_date,omitempty"` // Purchase date of the accessory
Qty int `json:"qty,omitempty"` // Quantity of the accessory
RemainingQty int `json:"remaining_qty,omitempty"` // Remaining quantity of the accessory
Supplier *Record `json:"supplier,omitempty"` // Name and ID of the accessory's supplier
UpdatedAt *DateInfo `json:"updated_at,omitempty"` // When the accessory was updated
UserCanCheckout bool `json:"user_can_checkout,omitempty"` // If the user can checkout the accessory
}
type AccessoryClient
AccessoriesClient for chaining methods
type AccessoryClient struct {
*Client
}
func (*AccessoryClient) GetAllAccessories
func (c *AccessoryClient) GetAllAccessories() (*AccessoryList, error)
* # List all Accessories in Snipe-IT
- /api/v1/accessories
- - https://snipe-it.readme.io/reference/accessories
type AccessoryList
### Accessories ------------------------------------------------------------------------- Source: https://snipe-it.readme.io/reference/accessories
type AccessoryList = PaginatedList[Accessory]
type AccessoryQuery
* Query Parameters for Accessories
type AccessoryQuery struct {
Limit int `url:"limit,omitempty"` // Specify the number of results you wish to return. Defaults to 50.
Offset int `url:"offset,omitempty"` // Specify the number of results to skip before starting to return items. Defaults to 0.
Search string `url:"search,omitempty"` // Search for an asset by asset tag, serial, or model number.
OrderNumber string `url:"order_number,omitempty"` // Return only assets associated with the specified order number.
Sort string `url:"sort,omitempty"` // Sort the results by the specified column. Defaults to id.
Order string `url:"order,omitempty"` // Sort the results in the specified order. Defaults to asc.
Expand string `url:"expand,omitempty"` // Expand the results to include full details of the associated model, category, and manufacturer.
}
func (*AccessoryQuery) Copy
func (q *AccessoryQuery) Copy() QueryInterface
### AccessoryQuery implements QueryInterface ---------------------------------------------------------------------
func (*AccessoryQuery) GetLimit
func (q *AccessoryQuery) GetLimit() int
func (*AccessoryQuery) GetOffset
func (q *AccessoryQuery) GetOffset() int
func (*AccessoryQuery) SetLimit
func (q *AccessoryQuery) SetLimit(limit int)
func (*AccessoryQuery) SetOffset
func (q *AccessoryQuery) SetOffset(offset int)
type AssetClient
AssetClient for chaining methods
type AssetClient struct {
*Client
}
func (*AssetClient) CreateAsset
func (c *AssetClient) CreateAsset(p *Hardware) (*Hardware, error)
* # Create an asset in Snipe-IT
- /api/v1/hardware
- - https://snipe-it.readme.io/reference/hardware-create
func (*AssetClient) DeleteAsset
func (c *AssetClient) DeleteAsset(id int) (string, error)
* # Delete an asset in Snipe-IT
- /api/v1/hardware/{id}
- - https://snipe-it.readme.io/reference/hardware-delete
func (*AssetClient) GetAllAssets
func (c *AssetClient) GetAllAssets() (*HardwareList, error)
* List all Hardware Assets in Snipe-IT
- /api/v1/hardware
- - https://snipe-it.readme.io/reference/hardware-list
func (*AssetClient) GetAssetBySerial
func (c *AssetClient) GetAssetBySerial(serial string) (*HardwareList, error)
* Get Hardware Assets by Serial
- /api/v1/hardware/byserial/{serial}
- - https://snipe-it.readme.io/reference/hardware-by-serial
func (*AssetClient) PartialUpdateAsset
func (c *AssetClient) PartialUpdateAsset(id int, p *Hardware) (*Hardware, error)
Partially updates a specific asset in Snipe-IT
- /api/v1/hardware/{id}
- - https://snipe-it.readme.io/reference/hardware-partial-update
type AssetQuery
* Query Parameters for Assets
type AssetQuery struct {
Limit int `url:"limit,omitempty"` // Specify the number of results you wish to return. Defaults to 50.
Offset int `url:"offset,omitempty"` // Specify the number of results to skip before starting to return items. Defaults to 0.
Search string `url:"search,omitempty"` // Search for an asset by asset tag, serial, or model number.
OrderNumber string `url:"order_number,omitempty"` // Return only assets associated with the specified order number.
Sort string `url:"sort,omitempty"` // Sort the results by the specified column. Defaults to id.
Order string `url:"order,omitempty"` // Sort the results in the specified order. Defaults to asc.
ModelID int `url:"model_id,omitempty"` // Return only assets associated with the specified model ID.
CategoryID int `url:"category_id,omitempty"` // Return only assets associated with the specified category ID.
ManufacturerID int `url:"manufacturer_id,omitempty"` // Return only assets associated with the specified manufacturer ID.
CompanyID int `url:"company_id,omitempty"` // Return only assets associated with the specified company ID.
LocationID int `url:"location_id,omitempty"` // Return only assets associated with the specified location ID.
Status string `url:"status,omitempty"` // Optionally restrict asset results to one of these status types: RTD, Deployed, Undeployable, Deleted, Archived, Requestable
StatusID int `url:"status_id,omitempty"` // Return only assets associated with the specified status ID.
}
func (*AssetQuery) Copy
func (q *AssetQuery) Copy() QueryInterface
### AssetQuery implements QueryInterface ---------------------------------------------------------------------
func (*AssetQuery) GetLimit
func (q *AssetQuery) GetLimit() int
func (*AssetQuery) GetOffset
func (q *AssetQuery) GetOffset() int
func (*AssetQuery) SetLimit
func (q *AssetQuery) SetLimit(limit int)
func (*AssetQuery) SetOffset
func (q *AssetQuery) SetOffset(offset int)
type AvailableActions
AvailableActions represents the available actions for a hardware item.
type AvailableActions struct {
Checkin bool `json:"checkin,omitempty"` // Whether check-in action is available.
Checkout bool `json:"checkout,omitempty"` // Whether check-out action is available.
Clone bool `json:"clone,omitempty"` // Whether clone action is available.
Delete bool `json:"delete,omitempty"` // Whether delete action is available.
Restore bool `json:"restore,omitempty"` // Whether restore action is available.
Update bool `json:"update,omitempty"` // Whether update action is available.
}
type Category
Category represents an individual category. https://snipe-it.readme.io/reference/categories#sortable-columns
type Category struct {
ID int64 `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Image string `json:"image,omitempty"`
CategoryType string `json:"category_type,omitempty"`
EULA bool `json:"eula,omitempty"`
CheckinEmail bool `json:"checkin_email,omitempty"`
RequireAcceptance bool `json:"require_acceptance,omitempty"`
AssetsCount int64 `json:"assets_count,omitempty"`
AccessoriesCount int64 `json:"accessories_count,omitempty"`
ConsumablesCount int64 `json:"consumables_count,omitempty"`
ComponentsCount int64 `json:"components_count,omitempty"`
LicensesCount int64 `json:"licenses_count,omitempty"`
CreatedAt *DateInfo `json:"created_at,omitempty"`
UpdatedAt *DateInfo `json:"updated_at,omitempty"`
Actions *AvailableActions `json:"available_actions,omitempty"`
}
type CategoryList
### Categories ------------------------------------------------------------------------- Source: https://snipe-it.readme.io/reference/categories
type CategoryList = PaginatedList[Category]
type Client
### SnipeIT Client Structs ---------------------------------------------------------------------
type Client struct {
BaseURL string // BaseURL is the base URL for the SnipeIT API.
HTTP *requests.Client // HTTP client for the SnipeIT API.
Log *log.Logger // Log is the logger for the SnipeIT API.
Cache *cache.Cache // Cache for the SnipeIT API.
}
func NewClient
func NewClient(verbosity int) *Client
func (*Client) Accessories
func (c *Client) Accessories() *AccessoryClient
Entry point for accessories-related operations
func (*Client) Assets
func (c *Client) Assets() *AssetClient
Entry point for asset-related operations
func (*Client) BuildURL
func (c *Client) BuildURL(endpoint string, identifiers ...interface{}) string
BuildURL builds a URL for a given resource and identifiers.
func (*Client) GetCache
func (c *Client) GetCache(key string, target interface{}) bool
* GetCache retrieves a SnipeIT API response from the cache
func (*Client) Locations
func (c *Client) Locations() *LocationClient
Entry point for locations-related operations
func (*Client) SetCache
func (c *Client) SetCache(key string, value interface{}, duration time.Duration)
* SetCache stores a SnipeIT API response in the cache
type CustomAssetFields
type CustomAssetFields map[string]interface{} // Custom fields of a Snipe-IT asset (This will typically be the `DB Field` property in the WebUI)
type CustomFields
CustomFields represents the custom fields of a hardware item.
type CustomFields struct {
}
type DateInfo
DateInfo represents a date and its formatted representation.
type DateInfo struct {
Date string `json:"datetime,omitempty"` // The date in yyyy-mm-dd format.
Formatted string `json:"formatted,omitempty"` // The formatted date.
}
type Hardware
Hardware represents an individual hardware item. https://snipe-it.readme.io/reference/hardware-list#sortable-columns
type Hardware struct {
ID int `json:"id,omitempty"` // ID of the hardware item.
Name string `json:"name,omitempty"` // Name of the hardware item.
AssetTag string `json:"asset_tag,omitempty"` // Asset tag of the hardware item.
Serial string `json:"serial,omitempty"` // Serial number of the hardware item.
Model *Record `json:"model,omitempty"` // Model of the hardware item.
BYOD bool `json:"byod,omitempty"` // Whether the hardware item is BYOD.
ModelNumber string `json:"model_number,omitempty"` // Model number of the hardware item.
EOL int `json:"eol,omitempty"` // End of life of the hardware item.
AssetEOLDate *DateInfo `json:"asset_eol_date,omitempty"` // Asset end of life date of the hardware item.
StatusLabel *StatusLabel `json:"status_label,omitempty"` // Status label of the hardware item.
Category *Record `json:"category,omitempty"` // Category of the hardware item.
Manufacturer *Record `json:"manufacturer,omitempty"` // Manufacturer of the hardware item.
Supplier *Record `json:"supplier,omitempty"` // Supplier of the hardware item.
Notes string `json:"notes,omitempty"` // Notes associated with the hardware item.
OrderNumber string `json:"order_number,omitempty"` // Order number of the hardware item.
Company *Record `json:"company,omitempty"` // Company of the hardware item.
Location *Record `json:"location,omitempty"` // Location of the hardware item.
RTDLocation *Record `json:"rtd_location,omitempty"` // RTD location of the hardware item.
Image string `json:"image,omitempty"` // Image of the hardware item.
QR string `json:"qr,omitempty"` // QR code of the hardware item.
AltBarcode string `json:"alt_barcode,omitempty"` // Alternate barcode of the hardware item.
AssignedTo *User `json:"assigned_to,omitempty"` // User to whom the hardware item is assigned.
WarrantyMonths string `json:"warranty_months,omitempty"` // Warranty months of the hardware item.
WarrantyExpires string `json:"warranty_expires,omitempty"` // Warranty expiry date of the hardware item.
CreatedAt *DateInfo `json:"created_at,omitempty"` // Time when the hardware item was created.
UpdatedAt *DateInfo `json:"updated_at,omitempty"` // Time when the hardware item was last updated.
LastAuditDate string `json:"last_audit_date,omitempty"` // Last audit date of the hardware item.
NextAuditDate string `json:"next_audit_date,omitempty"` // Next audit date of the hardware item.
DeletedAt string `json:"deleted_at,omitempty"` // Time when the hardware item was deleted.
PurchaseDate *DateInfo `json:"purchase_date,omitempty"` // Purchase date of the hardware item.
Age string `json:"age,omitempty"` // Age of the hardware item.
LastCheckout *DateInfo `json:"last_checkout,omitempty"` // Time when the hardware item was last checked out.
ExpectedCheckin *DateInfo `json:"expected_checkin,omitempty"` // Expected check-in date of the hardware item.
PurchaseCost string `json:"purchase_cost,omitempty"` // Purchase cost of the hardware item.
CheckinCounter int `json:"checkin_counter,omitempty"` // Check-in counter of the hardware item.
CheckoutCounter int `json:"checkout_counter,omitempty"` // Check-out counter of the hardware item.
RequestsCounter int `json:"requests_counter,omitempty"` // Request counter of the hardware item.
UserCanCheckout bool `json:"user_can_checkout,omitempty"` // Whether the user can check-out the hardware item.
CustomFields *CustomFields `json:"custom_fields,omitempty"` // Custom fields of the hardware item.
AvailableActions *AvailableActions `json:"available_actions,omitempty"` // Available actions for the hardware item.
CustomAssetFields
}
type HardwareList
### Assets ------------------------------------------------------------------------- Source: https://snipe-it.readme.io/reference/hardware-list
type HardwareList = PaginatedList[Hardware]
type Location
type Location struct {
ID int `json:"id,omitempty"` // The ID of the location.
Name string `json:"name,omitempty"` // The name of the location.
Image string `json:"image,omitempty"` // The URL of the location's image.
Address string `json:"address,omitempty"` // The address of the location.
Address2 string `json:"address2,omitempty"` // The second address line of the location.
City string `json:"city,omitempty"` // The city of the location.
State string `json:"state,omitempty"` // The state of the location.
Country string `json:"country,omitempty"` // The country of the location.
Zip string `json:"zip,omitempty"` // The zip code of the location.
AssetsAssigned int `json:"assigned_assets_count,omitempty"` // The number of assets assigned to the location.
Assets int `json:"assets_count,omitempty"` // The number of assets at the location.
RTDAssets int `json:"rtd_assets_count,omitempty"` // The number of assets ready to deploy at the location.
Users int `json:"users_count,omitempty"` // The number of users at the location.
Currency string `json:"currency,omitempty"` // The currency of the location.
LDAP interface{} `json:"ldap_ou,omitempty"` // The LDAP OU of the location.
CreatedAt *DateInfo `json:"created_at,omitempty"` // The date the location was created.
UpdatedAt *DateInfo `json:"updated_at,omitempty"` // The date the location was updated.
Parent *Record `json:"parent,omitempty"` // The parent location of the location.
ParentID int `json:"parent_id,omitempty"` // The ID of the parent location.
Manager *Record `json:"manager,omitempty"` // The manager of the location.
ManagerID int `json:"manager_id,omitempty"` // The ID of the manager.
Children []Location `json:"children,omitempty"` // The children of the location.
Actions AvailableActions `json:"available_actions,omitempty"` // The available actions on the location.
}
type LocationClient
LocationClient for chaining methods
type LocationClient struct {
*Client
}
func (*LocationClient) CreateLocation
func (c *LocationClient) CreateLocation(p *Location) (*Location, error)
* # Create a new Location in Snipe-IT
- /api/v1/locations
- - https://snipe-it.readme.io/reference/locations-2
func (*LocationClient) DeleteLocation
func (c *LocationClient) DeleteLocation(id int) error
* # Delete a Location in Snipe-IT
- /api/v1/locations/{locationId}
- - https://snipe-it.readme.io/reference/locationsid-2
func (*LocationClient) GetAllLocations
func (c *LocationClient) GetAllLocations() (*LocationList, error)
* # List all Locations in Snipe-IT
- /api/v1/locations
- - https://snipe-it.readme.io/reference/locations
func (*LocationClient) GetLocation
func (c *LocationClient) GetLocation(id int) (*Location, error)
Get Location Details by ID
- /api/v1/locations/{id}
- - https://snipe-it.readme.io/reference/locations-1
func (*LocationClient) PartialUpdateLocation
func (c *LocationClient) PartialUpdateLocation(id int, p *Location) (*Location, error)
Partially update a Location in Snipe-IT
- /api/v1/locations/{locationId}
- - https://snipe-it.readme.io/reference/locationsid
func (*LocationClient) UpdateLocation
func (c *LocationClient) UpdateLocation(id int, p *Location) (*Location, error)
* # Update a Location in Snipe-IT
- /api/v1/locations/{id}
- - https://snipe-it.readme.io/reference/locations-3
type LocationList
### Locations -------------------------------------------------------------------------
type LocationList = PaginatedList[Location]
type LocationQuery
* Query Parameters for Locations
type LocationQuery struct {
Name string `url:"name,omitempty"` // Search for a location by name.
Limit int `url:"limit,omitempty"` // Specify the number of results you wish to return. Defaults to 50.
Offset int `url:"offset,omitempty"` // Specify the number of results to skip before starting to return items. Defaults to 0.
Search string `url:"search,omitempty"` // Search for a location by name or address.
Sort string `url:"sort,omitempty"` // Sort the results by the specified column. Defaults to id.
Order string `url:"order,omitempty"` // Sort the results in the specified order. Defaults to asc.
Address string `url:"address,omitempty"` // Search for a location by address.
Address2 string `url:"address2,omitempty"` // Search for a location by address2.
City string `url:"city,omitempty"` // Search for a location by city.
State string `url:"state,omitempty"` // Search for a location by state.
Country string `url:"country,omitempty"` // Search for a location by country.
Expand string `url:"expand,omitempty"` // Expand the results to include full details of the associated model, category, and manufacturer.
}
func (*LocationQuery) Copy
func (q *LocationQuery) Copy() QueryInterface
### LocationQuery implements QueryInterface ---------------------------------------------------------------------
func (*LocationQuery) GetLimit
func (q *LocationQuery) GetLimit() int
func (*LocationQuery) GetOffset
func (q *LocationQuery) GetOffset() int
func (*LocationQuery) SetLimit
func (q *LocationQuery) SetLimit(limit int)
func (*LocationQuery) SetOffset
func (q *LocationQuery) SetOffset(offset int)
type PaginatedList
PaginatedList is a generic structure representing a paginated response from SnipeIT with items of any type.
type PaginatedList[E any] struct {
Total int `json:"total,omitempty"` // The total number of items.
Rows *[]*E `json:"rows,omitempty"` // An array of items.
}
func (PaginatedList[E]) Append
func (pl PaginatedList[E]) Append(elements *[]*E)
func (PaginatedList[E]) Elements
func (pl PaginatedList[E]) Elements() *[]*E
func (PaginatedList[E]) Map
func (pl PaginatedList[E]) Map() map[interface{}]*E
func (PaginatedList[E]) TotalCount
func (pl PaginatedList[E]) TotalCount() int
type PaginatedResponse
PaginatedResponse is an interface for SnipeIT API responses involving pagination
type PaginatedResponse[E any] interface {
TotalCount() int
Append(*[]*E)
Elements() *[]*E
}
type QueryInterface
QueryInterface defines methods for queries with pagination and filtering
type QueryInterface interface {
Copy() QueryInterface
GetLimit() int
SetLimit(int)
GetOffset() int
SetOffset(int)
}
type Record
### Common Asset types ------------------------------------------------------------------------- Record represents an id:name pairing for many types of records in Snipe-IT.
type Record struct {
ID int64 `json:"id"` // ID of the record {category, company, department, location, manufacturer, supplier, etc.}
Name string `json:"name"` // Name of the record {category, company, department, location, manufacturer, supplier, etc.}
}
type SnipeITResponse
SnipeITResponse is an interface for Snipe-IT API responses
type SnipeITResponse[E any] struct {
Status string `json:"status,omitempty"` // Status of the response
Messages string `json:"messages,omitempty"` // Messages associated with the response
Error string `json:"error,omitempty"` // Error associated with the respons
Payload *E `json:"payload,omitempty"` // Payload of the response -- can be an object of any type
}
type StatusLabel
StatusLabel represents the status label of a hardware item.
type StatusLabel struct {
ID int `json:"id,omitempty"` // ID of the status label.
Name string `json:"name,omitempty"` // Name of thestatus label.
StatusMeta string `json:"status_meta,omitempty"` // Meta status of the status label.
StatusType string `json:"status_type,omitempty"` // Type of the status label.
}
type User
type User struct {
Activated bool `json:"activated"` // Specifies if the user is active or not
Address string `json:"address,omitempty"` // Address of the user
AssetsCount int64 `json:"assets_count,omitempty"` // Number of assets associated with the user
AutoassignLicenses bool `json:"autoassign_licenses,omitempty"` // Specifies if the licenses are automatically assigned to the user
Avatar string `json:"avatar,omitempty"` // URL of the user's avatar
AvailableActions AvailableActions `json:"available_actions,omitempty"` // Available actions on the user profile
City string `json:"city,omitempty"` // City of the user
Company Record `json:"company,omitempty"` // Company associated with the user
ConsumablesCount int64 `json:"consumables_count,omitempty"` // Count of consumables associated with the user
Country string `json:"country,omitempty"` // Country of the user
CreatedAt *DateInfo `json:"created_at,omitempty"` // Time when the user was created
CreatedBy *DateInfo `json:"created_by,omitempty"` // Who created the user
Department Record `json:"department,omitempty"` // Department of the user
Email string `json:"email,omitempty"` // Email of the user
EmployeeNum string `json:"employee_num,omitempty"` // Employee number of the user
EndDate *DateInfo `json:"end_date,omitempty"` // End date of the user
FirstName string `json:"first_name,omitempty"` // First name of the user
Groups interface{} `json:"groups,omitempty"` // Groups that the user belongs to
ID int64 `json:"id,omitempty"` // ID of the user
Jobtitle string `json:"jobtitle,omitempty"` // Job title of the user
LastLogin string `json:"last_login,omitempty"` // Last login time of the user
LastName string `json:"last_name,omitempty"` // Last name of the user
LdapImport bool `json:"ldap_import,omitempty"` // Specifies if the user is imported from LDAP
Locale string `json:"locale,omitempty"` // Locale of the user
Location *Record `json:"location,omitempty"` // Location of the user
Manager *Record `json:"manager,omitempty"` // Manager of the user
Name string `json:"name,omitempty"` // Full name of the user
Notes string `json:"notes,omitempty"` // Notes associated with the user
Permissions map[string]string `json:"permissions,omitempty"` // Permissions of the user
Phone string `json:"phone,omitempty"` // Phone number of the user
Remote bool `json:"remote,omitempty"` // Specifies if the user is remote
StartDate *DateInfo `json:"start_date,omitempty"` // Start date of the user
State string `json:"state,omitempty"` // State of the user
TwoFactorEnrolled bool `json:"two_factor_enrolled,omitempty"` // Specifies if the user has enrolled for two factor authentication
TwoFactorOptin bool `json:"two_factor_optin,omitempty"` // Specifies if the user has opted for two factor authentication
UpdatedAt *DateInfo `json:"updated_at,omitempty"` // Time when the user was last updated
Username string `json:"username,omitempty"` // Username of the user
Vip bool `json:"vip,omitempty"` // Specifies if the user is a VIP
Website string `json:"website,omitempty"` // Website of the user
Zip string `json:"zip,omitempty"` // Zip code of the user
}
type UserList
### Users -------------------------------------------------------------------------
type UserList = PaginatedList[User]
Generated by gomarkdoc