Documentation ¶
Index ¶
- Variables
- type AccessLevel
- type AssetRef
- type AtRef
- type Audience
- type Blacklist
- type Body
- func (src *Body) AssignTo(dst interface{}) error
- func (dst *Body) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Body) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Body) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Body) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Body) Get() interface{}
- func (dst *Body) Scan(src interface{}) error
- func (dst *Body) Set(src interface{}) error
- func (src *Body) Value() (driver.Value, error)
- type Color
- func (src *Color) AssignTo(dst interface{}) error
- func (dst *Color) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Color) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Color) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Color) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Color) Get() interface{}
- func (dst *Color) Scan(src interface{}) error
- func (dst *Color) Set(src interface{}) error
- func (src *Color) Value() (driver.Value, error)
- type CourseStatus
- func (src *CourseStatus) AssignTo(dst interface{}) error
- func (dst *CourseStatus) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *CourseStatus) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *CourseStatus) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *CourseStatus) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *CourseStatus) Get() interface{}
- func (dst *CourseStatus) Scan(src interface{}) error
- func (dst *CourseStatus) Set(src interface{}) error
- func (src *CourseStatus) String() string
- func (src *CourseStatus) Value() (driver.Value, error)
- type CourseStatusValue
- type CrossStudyRef
- type Email
- func (src *Email) AssignTo(dst interface{}) error
- func (dst *Email) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Email) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Email) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Email) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Email) Get() interface{}
- func (dst *Email) Scan(src interface{}) error
- func (dst *Email) Set(src interface{}) error
- func (src *Email) Value() (driver.Value, error)
- type EmailType
- func (src *EmailType) AssignTo(dst interface{}) error
- func (dst *EmailType) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *EmailType) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *EmailType) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *EmailType) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *EmailType) Get() interface{}
- func (dst *EmailType) Scan(src interface{}) error
- func (dst *EmailType) Set(src interface{}) error
- func (src *EmailType) String() string
- func (src *EmailType) Value() (driver.Value, error)
- type EmailTypeValue
- type EnrollmentStatus
- func (src *EnrollmentStatus) AssignTo(dst interface{}) error
- func (dst *EnrollmentStatus) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *EnrollmentStatus) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *EnrollmentStatus) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *EnrollmentStatus) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *EnrollmentStatus) Get() interface{}
- func (dst *EnrollmentStatus) Scan(src interface{}) error
- func (dst *EnrollmentStatus) Set(src interface{}) error
- func (src *EnrollmentStatus) String() string
- func (src *EnrollmentStatus) Value() (driver.Value, error)
- type EnrollmentStatusValue
- type EventAction
- func (src *EventAction) AssignTo(dst interface{}) error
- func (dst *EventAction) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *EventAction) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *EventAction) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *EventAction) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *EventAction) Get() interface{}
- func (dst *EventAction) Scan(src interface{}) error
- func (dst *EventAction) Set(src interface{}) error
- func (src *EventAction) String() string
- func (src *EventAction) Value() (driver.Value, error)
- type EventActionValue
- type Filename
- func (src *Filename) AssignTo(dst interface{}) error
- func (dst *Filename) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Filename) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Filename) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Filename) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Filename) Get() interface{}
- func (dst *Filename) Scan(src interface{}) error
- func (dst *Filename) Set(src interface{}) error
- func (src *Filename) Value() (driver.Value, error)
- type Markdown
- func (src *Markdown) AssetRefs() []*AssetRef
- func (src *Markdown) AssignTo(dst interface{}) error
- func (src *Markdown) AtRefs() []*AtRef
- func (src *Markdown) CrossStudyRefs() ([]*CrossStudyRef, error)
- func (dst *Markdown) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Markdown) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Markdown) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Markdown) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Markdown) Get() interface{}
- func (src *Markdown) NumberRefs() ([]*NumberRef, error)
- func (dst *Markdown) Scan(src interface{}) error
- func (dst *Markdown) Set(src interface{}) error
- func (src *Markdown) ToHTML() string
- func (src *Markdown) ToText() string
- func (src *Markdown) Value() (driver.Value, error)
- type NodeType
- type NumberRef
- type OID
- func (src *OID) AssignTo(dst interface{}) error
- func (src *OID) DBVarName() string
- func (dst *OID) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *OID) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *OID) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *OID) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *OID) Get() interface{}
- func (src *OID) MarshalJSON() ([]byte, error)
- func (dst *OID) Scan(src interface{}) error
- func (dst *OID) Set(src interface{}) error
- func (dst *OID) UnmarshalJSON(b []byte) error
- func (src *OID) Value() (driver.Value, error)
- type Operation
- func (src *Operation) AssignTo(dst interface{}) error
- func (dst *Operation) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Operation) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Operation) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Operation) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Operation) Get() interface{}
- func (dst *Operation) Scan(src interface{}) error
- func (dst *Operation) Set(src interface{}) error
- func (o *Operation) String() string
- func (dst *Operation) UnmarshalJSON(bs []byte) error
- func (src *Operation) Value() (driver.Value, error)
- type Password
- func (src *Password) AssignTo(dst interface{}) error
- func (p *Password) CheckStrength(s PasswordStrength) error
- func (p *Password) CompareToPassword(password string) error
- func (dst *Password) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Password) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Password) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Password) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Password) Get() interface{}
- func (dst *Password) Scan(src interface{}) error
- func (dst *Password) Set(src interface{}) error
- func (src *Password) Value() (driver.Value, error)
- type PasswordStrength
- type URLSafeName
- func (src *URLSafeName) AssignTo(dst interface{}) error
- func (dst *URLSafeName) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *URLSafeName) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *URLSafeName) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *URLSafeName) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *URLSafeName) Get() interface{}
- func (dst *URLSafeName) Scan(src interface{}) error
- func (dst *URLSafeName) Set(src interface{}) error
- func (src *URLSafeName) Value() (driver.Value, error)
- type Username
- func (src *Username) AssignTo(dst interface{}) error
- func (dst *Username) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *Username) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *Username) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *Username) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *Username) Get() interface{}
- func (src *Username) IsBlacklisted() (bool, error)
- func (dst *Username) Scan(src interface{}) error
- func (dst *Username) Set(src interface{}) error
- func (src *Username) Value() (driver.Value, error)
- type WordName
- func (src *WordName) AssignTo(dst interface{}) error
- func (dst *WordName) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *WordName) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *WordName) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *WordName) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *WordName) Get() interface{}
- func (dst *WordName) Scan(src interface{}) error
- func (dst *WordName) Set(src interface{}) error
- func (src *WordName) Value() (driver.Value, error)
- type WordsName
- func (src *WordsName) AssignTo(dst interface{}) error
- func (dst *WordsName) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
- func (dst *WordsName) DecodeText(ci *pgtype.ConnInfo, src []byte) error
- func (src *WordsName) EncodeBinary(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (src *WordsName) EncodeText(ci *pgtype.ConnInfo, buf []byte) ([]byte, error)
- func (dst *WordsName) Get() interface{}
- func (dst *WordsName) Scan(src interface{}) error
- func (dst *WordsName) Set(src interface{}) error
- func (src *WordsName) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AssetRefRegexp = regexp.MustCompile(`(?:(?:^|\s)\${2})([\w-.]+)(?:\?{2}(.*)\?{2})?(?:\s|$)`)
View Source
var AtRefRegexp = regexp.MustCompile(`(?:^|\s)@(\w+)(?:\s|$)`)
View Source
var CrossStudyRefRegexp = regexp.MustCompile(`(?:^|\s)(\w+)\/([\w-]+)#(\d+)(?:\s|$)`)
View Source
var ErrInvalidEmail = errors.New("invalid email")
View Source
var ErrPasswordEmpty = errors.New("password cannot be empty")
View Source
var ErrPasswordTooWeak = errors.New("password too weak")
View Source
var ErrUndefined = errors.New("cannot encode status undefined")
View Source
var InvalidColorError = errors.New("color must be in hexadecimal format")
View Source
var InvalidFilenameCharacters = errors.New("filename may only contain alphanumeric characters, hyphens, underscores, or dots")
View Source
var InvalidFilenameHyphens = errors.New("filename cannot have multiple consecutive dots, and cannot begin or end with a dot")
View Source
var InvalidFilenameLength = errors.New("filename must be less than 40 characters")
View Source
var InvalidUsernameCharacters = errors.New("username may only contain alphanumeric characters or hyphens")
View Source
var InvalidUsernameHyphens = errors.New("username cannot have multiple consecutive hyphens, and cannot begin or end with a hyphen")
View Source
var InvalidUsernameLength = errors.New("username must be less than 40 characters")
View Source
var InvalidWordNameCharacters = errors.New("name may only contain alphanumeric characters or hyphens")
View Source
var InvalidWordNameLength = errors.New("name must be less than 40 characters")
View Source
var InvalidWordsNameCharacters = errors.New("name may only contain alphanumeric characters, hyphens, or underscores")
View Source
var InvalidWordsNameLength = errors.New("name must be at least one character but less than 40 characters")
View Source
var NumberRefRegexp = regexp.MustCompile(`(?:^|\s)#(\d+)(?:\s|$)`)
Functions ¶
This section is empty.
Types ¶
type AccessLevel ¶
type AccessLevel int
const ( CreateAccess AccessLevel = iota ConnectAccess DeleteAccess DisconnectAccess ReadAccess UpdateAccess )
func ParseAccessLevel ¶
func ParseAccessLevel(lvl string) (AccessLevel, error)
func (*AccessLevel) Scan ¶
func (al *AccessLevel) Scan(value interface{}) (err error)
func (AccessLevel) String ¶
func (al AccessLevel) String() string
type Body ¶
func (*Body) EncodeBinary ¶
func (*Body) EncodeText ¶
type Color ¶
func (*Color) EncodeBinary ¶
func (*Color) EncodeText ¶
type CourseStatus ¶
type CourseStatus struct { Status pgtype.Status V CourseStatusValue }
func NewCourseStatus ¶
func NewCourseStatus(v CourseStatusValue) CourseStatus
func ParseCourseStatus ¶
func ParseCourseStatus(s string) (CourseStatus, error)
func (*CourseStatus) AssignTo ¶
func (src *CourseStatus) AssignTo(dst interface{}) error
func (*CourseStatus) DecodeBinary ¶
func (dst *CourseStatus) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
func (*CourseStatus) DecodeText ¶
func (dst *CourseStatus) DecodeText(ci *pgtype.ConnInfo, src []byte) error
func (*CourseStatus) EncodeBinary ¶
func (*CourseStatus) EncodeText ¶
func (*CourseStatus) Get ¶
func (src *CourseStatus) Get() interface{}
func (*CourseStatus) Scan ¶
func (dst *CourseStatus) Scan(src interface{}) error
Scan implements the database/sql Scanner interface.
func (*CourseStatus) Set ¶
func (dst *CourseStatus) Set(src interface{}) error
func (*CourseStatus) String ¶
func (src *CourseStatus) String() string
type CourseStatusValue ¶
type CourseStatusValue int
const ( CourseStatusAdvancing CourseStatusValue = iota CourseStatusCompleted )
func (CourseStatusValue) String ¶
func (f CourseStatusValue) String() string
type CrossStudyRef ¶
CrossStudyRef -
type Email ¶
func (*Email) EncodeBinary ¶
func (*Email) EncodeText ¶
type EmailType ¶
type EmailType struct { Status pgtype.Status V EmailTypeValue }
func NewEmailType ¶
func NewEmailType(v EmailTypeValue) EmailType
func ParseEmailType ¶
func (*EmailType) DecodeBinary ¶
func (*EmailType) DecodeText ¶
func (*EmailType) EncodeBinary ¶
func (*EmailType) EncodeText ¶
type EmailTypeValue ¶
type EmailTypeValue int
const ( BackupEmail EmailTypeValue = iota ExtraEmail PrimaryEmail )
func (EmailTypeValue) String ¶
func (src EmailTypeValue) String() string
type EnrollmentStatus ¶
type EnrollmentStatus struct { Status pgtype.Status V EnrollmentStatusValue }
func NewEnrollmentStatus ¶
func NewEnrollmentStatus(v EnrollmentStatusValue) EnrollmentStatus
func ParseEnrollmentStatus ¶
func ParseEnrollmentStatus(s string) (EnrollmentStatus, error)
func (*EnrollmentStatus) AssignTo ¶
func (src *EnrollmentStatus) AssignTo(dst interface{}) error
func (*EnrollmentStatus) DecodeBinary ¶
func (dst *EnrollmentStatus) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
func (*EnrollmentStatus) DecodeText ¶
func (dst *EnrollmentStatus) DecodeText(ci *pgtype.ConnInfo, src []byte) error
func (*EnrollmentStatus) EncodeBinary ¶
func (*EnrollmentStatus) EncodeText ¶
func (*EnrollmentStatus) Get ¶
func (src *EnrollmentStatus) Get() interface{}
func (*EnrollmentStatus) Scan ¶
func (dst *EnrollmentStatus) Scan(src interface{}) error
Scan implements the database/sql Scanner interface.
func (*EnrollmentStatus) Set ¶
func (dst *EnrollmentStatus) Set(src interface{}) error
func (*EnrollmentStatus) String ¶
func (src *EnrollmentStatus) String() string
type EnrollmentStatusValue ¶
type EnrollmentStatusValue int
const ( EnrollmentStatusEnrolled EnrollmentStatusValue = iota EnrollmentStatusIgnored EnrollmentStatusUnenrolled )
func (EnrollmentStatusValue) String ¶
func (f EnrollmentStatusValue) String() string
type EventAction ¶
type EventAction struct { Status pgtype.Status V EventActionValue }
func NewEventAction ¶
func NewEventAction(v EventActionValue) EventAction
func ParseEventAction ¶
func ParseEventAction(s string) (EventAction, error)
func (*EventAction) AssignTo ¶
func (src *EventAction) AssignTo(dst interface{}) error
func (*EventAction) DecodeBinary ¶
func (dst *EventAction) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
func (*EventAction) DecodeText ¶
func (dst *EventAction) DecodeText(ci *pgtype.ConnInfo, src []byte) error
func (*EventAction) EncodeBinary ¶
func (*EventAction) EncodeText ¶
func (*EventAction) Get ¶
func (src *EventAction) Get() interface{}
func (*EventAction) Scan ¶
func (dst *EventAction) Scan(src interface{}) error
Scan implements the database/sql Scanner interface.
func (*EventAction) Set ¶
func (dst *EventAction) Set(src interface{}) error
func (*EventAction) String ¶
func (src *EventAction) String() string
type EventActionValue ¶
type EventActionValue int
const ( CreatedAction EventActionValue = iota AddedToCourseAction RemovedFromCourseAction AppledAction UnappledAction CommentedAction LabeledAction UnlabeledAction MentionedAction PublishedAction ReferencedAction RenamedAction )
func (EventActionValue) String ¶
func (f EventActionValue) String() string
type Filename ¶
func (*Filename) DecodeBinary ¶
func (*Filename) DecodeText ¶
func (*Filename) EncodeBinary ¶
func (*Filename) EncodeText ¶
type Markdown ¶
Markdown -
func (*Markdown) CrossStudyRefs ¶
func (src *Markdown) CrossStudyRefs() ([]*CrossStudyRef, error)
CrossStudyRefs -
func (*Markdown) DecodeBinary ¶
DecodeBinary -
func (*Markdown) DecodeText ¶
DecodeText -
func (*Markdown) EncodeBinary ¶
EncodeBinary -
func (*Markdown) EncodeText ¶
EncodeText -
type NodeType ¶
type NodeType int
const ( ActivityNodeType NodeType = iota ActivityAssetNodeType AppledNodeType AssetNodeType CommentNodeType CommentDraftBackupNodeType CourseNodeType CourseLessonNodeType EmailNodeType EnrolledNodeType EventNodeType EVTNodeType LabelNodeType LabeledNodeType LessonNodeType LessonDraftBackupNodeType NotificationNodeType PRTNodeType StudyNodeType TopicNodeType TopicedNodeType UserNodeType UserAssetNodeType )
func ParseNodeType ¶
type OID ¶
type OID struct { // Unique part of the OID without the type information. Short string Status pgtype.Status // Base64 encoded value of the OID. String string // Type of object for the OID. Type string }
Object ID
func NewOIDFromShort ¶
func (*OID) EncodeBinary ¶
func (*OID) EncodeText ¶
func (*OID) MarshalJSON ¶
func (*OID) UnmarshalJSON ¶
type Operation ¶
type Operation struct { // Access level for the Operation. AccessLevel AccessLevel // Type of node for the Operation. NodeType NodeType Status pgtype.Status }
func NewOperation ¶
func NewOperation(al AccessLevel, nt NodeType) *Operation
func ParseOperation ¶
func (*Operation) DecodeBinary ¶
func (*Operation) DecodeText ¶
func (*Operation) EncodeBinary ¶
func (*Operation) EncodeText ¶
func (*Operation) UnmarshalJSON ¶
type Password ¶
type Password struct { Bytes []byte Status pgtype.Status // contains filtered or unexported fields }
func NewPassword ¶
func (*Password) CheckStrength ¶
func (p *Password) CheckStrength(s PasswordStrength) error
func (*Password) CompareToPassword ¶
func (*Password) DecodeBinary ¶
func (*Password) DecodeText ¶
DecodeText only supports the hex format. This has been the default since PostgreSQL 9.0.
func (*Password) EncodeBinary ¶
func (*Password) EncodeText ¶
type PasswordStrength ¶
type PasswordStrength int
const ( VeryWeak PasswordStrength = iota Weak Moderate Strong VeryStrong )
type URLSafeName ¶
func (*URLSafeName) AssignTo ¶
func (src *URLSafeName) AssignTo(dst interface{}) error
func (*URLSafeName) DecodeBinary ¶
func (dst *URLSafeName) DecodeBinary(ci *pgtype.ConnInfo, src []byte) error
func (*URLSafeName) DecodeText ¶
func (dst *URLSafeName) DecodeText(ci *pgtype.ConnInfo, src []byte) error
func (*URLSafeName) EncodeBinary ¶
func (*URLSafeName) EncodeText ¶
func (*URLSafeName) Get ¶
func (dst *URLSafeName) Get() interface{}
func (*URLSafeName) Scan ¶
func (dst *URLSafeName) Scan(src interface{}) error
Scan implements the database/sql Scanner interface.
func (*URLSafeName) Set ¶
func (dst *URLSafeName) Set(src interface{}) error
type Username ¶
func (*Username) DecodeBinary ¶
func (*Username) DecodeText ¶
func (*Username) EncodeBinary ¶
func (*Username) EncodeText ¶
func (*Username) IsBlacklisted ¶
type WordName ¶
func (*WordName) DecodeBinary ¶
func (*WordName) DecodeText ¶
func (*WordName) EncodeBinary ¶
func (*WordName) EncodeText ¶
type WordsName ¶
func (*WordsName) DecodeBinary ¶
func (*WordsName) DecodeText ¶
func (*WordsName) EncodeBinary ¶
func (*WordsName) EncodeText ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.