ticket

package
v0.2.24 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

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 BoolField

func BoolField(id string, value bool) *v2.TicketCustomField

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 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

func ValidateTicket(ctx context.Context, schema *v2.TicketSchema, ticket *v2.Ticket) (bool, error)

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.

Jump to

Keyboard shortcuts

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