Documentation ¶
Index ¶
Constants ¶
const InventoryTransactionKey contextKey = 0
InventoryTransactionKey is the context key for the inventory database transaction for a request
const SkywardTransactionKey contextKey = 1
SkywardTransactionKey is the context key for the skyward database transaction for a request
const UserKey contextKey = 2
UserKey is the context key for the user for a request
Variables ¶
var ChargeURLBase = "/charges/edit?type=id&search="
ChargeURLBase is the base URL used for charge links
var DeviceURLBase = "/edit?type=id&search="
DeviceURLBase is the base URL used for device links
Functions ¶
Types ¶
type AuthConfig ¶
AuthConfig holds configuration for connecting to an authentication source
type Charge ¶ added in v1.2.0
Charge represents an inventory charge
func (*Charge) AmountCharged ¶ added in v1.2.0
AmountCharged is the total amount charged
type Status ¶ added in v1.2.0
type Status struct { Type string `json:"type"` Reason string `json:"reason,omitempty"` LinkType string `json:"link_type,omitempty"` Links []string `json:"links,omitempty"` }
Status represents the type of Chromebook a student will receive
type Student ¶
type Student struct { FirstName string LastName string OtherID string Grade int T2E2Status *string }
Student represents a Skyward Student
func GetStudent ¶ added in v1.2.0
GetStudent returns the Student with the given otherID
func GetStudentList ¶
GetStudentList returns a list of all Students
type User ¶
User represents an Active Directory User
func Authenticate ¶
func Authenticate(config *AuthConfig, username, password string) (*User, error)
Authenticate authenticates the given username and password against the given config, returning user information if successful, nil if unsuccessful, or an error if one occurred.