Documentation ¶
Index ¶
- Variables
- func BoolField(id string, value bool) *v2.TicketCustomField
- func BoolFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
- func CustomFieldForSchemaField(id string, schema *v2.TicketSchema, value interface{}) (*v2.TicketCustomField, error)
- func GetBoolValue(field *v2.TicketCustomField) (bool, error)
- func GetCustomFieldValue(field *v2.TicketCustomField) (interface{}, error)
- func GetCustomFieldValueOrDefault(field *v2.TicketCustomField) (interface{}, error)
- func GetDefaultCustomFieldValue(field *v2.TicketCustomField) (interface{}, error)
- func GetPickMultipleObjectValues(field *v2.TicketCustomField) ([]*v2.TicketCustomFieldObjectValue, error)
- func GetPickMultipleStringValues(field *v2.TicketCustomField) ([]string, error)
- func GetPickObjectValue(field *v2.TicketCustomField) (*v2.TicketCustomFieldObjectValue, error)
- func GetPickStringValue(field *v2.TicketCustomField) (string, error)
- func GetStringValue(field *v2.TicketCustomField) (string, error)
- func GetStringsValue(field *v2.TicketCustomField) ([]string, error)
- func GetTimestampValue(field *v2.TicketCustomField) (time.Time, error)
- func PickMultipleObjectValuesField(id string, values []*v2.TicketCustomFieldObjectValue) *v2.TicketCustomField
- func PickMultipleObjectValuesFieldSchema(id, displayName string, required bool, ...) *v2.TicketCustomField
- func PickMultipleStringsField(id string, values []string) *v2.TicketCustomField
- func PickMultipleStringsFieldSchema(id, displayName string, required bool, allowedValues []string) *v2.TicketCustomField
- func PickObjectValueField(id string, value *v2.TicketCustomFieldObjectValue) *v2.TicketCustomField
- func PickObjectValueFieldSchema(id, displayName string, required bool, ...) *v2.TicketCustomField
- func PickStringField(id string, value string) *v2.TicketCustomField
- func PickStringFieldSchema(id, displayName string, required bool, allowedValues []string) *v2.TicketCustomField
- func StringField(id, value string) *v2.TicketCustomField
- func StringFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
- func StringsField(id string, values []string) *v2.TicketCustomField
- func StringsFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
- func TimestampField(id string, value time.Time) *v2.TicketCustomField
- func TimestampFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
- func ValidateTicket(ctx context.Context, schema *v2.TicketSchema, ticket *v2.Ticket) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFieldNil = errors.New("error: field is nil")
View Source
var ErrTicketValidationError = errors.New("create ticket request is not valid")
Functions ¶
func BoolFieldSchema ¶
func BoolFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
func CustomFieldForSchemaField ¶
func CustomFieldForSchemaField(id string, schema *v2.TicketSchema, value interface{}) (*v2.TicketCustomField, error)
CustomFieldForSchemaField returns a typed custom field for a given schema field.
func GetBoolValue ¶
func GetBoolValue(field *v2.TicketCustomField) (bool, error)
func GetCustomFieldValue ¶
func GetCustomFieldValue(field *v2.TicketCustomField) (interface{}, error)
GetCustomFieldValue returns the interface{} of the value set on a given custom field.
func GetCustomFieldValueOrDefault ¶ added in v0.2.19
func GetCustomFieldValueOrDefault(field *v2.TicketCustomField) (interface{}, error)
func GetDefaultCustomFieldValue ¶ added in v0.2.19
func GetDefaultCustomFieldValue(field *v2.TicketCustomField) (interface{}, error)
func GetPickMultipleObjectValues ¶
func GetPickMultipleObjectValues(field *v2.TicketCustomField) ([]*v2.TicketCustomFieldObjectValue, error)
func GetPickMultipleStringValues ¶
func GetPickMultipleStringValues(field *v2.TicketCustomField) ([]string, error)
func GetPickObjectValue ¶
func GetPickObjectValue(field *v2.TicketCustomField) (*v2.TicketCustomFieldObjectValue, error)
func GetPickStringValue ¶
func GetPickStringValue(field *v2.TicketCustomField) (string, error)
func GetStringValue ¶
func GetStringValue(field *v2.TicketCustomField) (string, error)
func GetStringsValue ¶
func GetStringsValue(field *v2.TicketCustomField) ([]string, error)
func GetTimestampValue ¶
func GetTimestampValue(field *v2.TicketCustomField) (time.Time, error)
func PickMultipleObjectValuesField ¶
func PickMultipleObjectValuesField(id string, values []*v2.TicketCustomFieldObjectValue) *v2.TicketCustomField
func PickMultipleObjectValuesFieldSchema ¶
func PickMultipleObjectValuesFieldSchema(id, displayName string, required bool, allowedValues []*v2.TicketCustomFieldObjectValue) *v2.TicketCustomField
func PickMultipleStringsField ¶
func PickMultipleStringsField(id string, values []string) *v2.TicketCustomField
func PickMultipleStringsFieldSchema ¶
func PickMultipleStringsFieldSchema(id, displayName string, required bool, allowedValues []string) *v2.TicketCustomField
func PickObjectValueField ¶
func PickObjectValueField(id string, value *v2.TicketCustomFieldObjectValue) *v2.TicketCustomField
func PickObjectValueFieldSchema ¶
func PickObjectValueFieldSchema(id, displayName string, required bool, allowedValues []*v2.TicketCustomFieldObjectValue) *v2.TicketCustomField
func PickStringField ¶
func PickStringField(id string, value string) *v2.TicketCustomField
func PickStringFieldSchema ¶
func PickStringFieldSchema(id, displayName string, required bool, allowedValues []string) *v2.TicketCustomField
func StringField ¶
func StringField(id, value string) *v2.TicketCustomField
func StringFieldSchema ¶
func StringFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
func StringsField ¶
func StringsField(id string, values []string) *v2.TicketCustomField
func StringsFieldSchema ¶
func StringsFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
func TimestampField ¶
func TimestampField(id string, value time.Time) *v2.TicketCustomField
func TimestampFieldSchema ¶
func TimestampFieldSchema(id, displayName string, required bool) *v2.TicketCustomField
func ValidateTicket ¶
TODO(lauren) doesn't validate fields on ticket that are not in the schema ValidateTicket takes a ticket schema and ensures that the supplied ticket conforms.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.