Versions in this module Expand all Collapse all v0 v0.1.1 Dec 22, 2017 Changes in this version + const NAME + const VERSION type App + func (app *App) GetBasicAuthPassword() string + func (app *App) GetBasicAuthUser() string + func (app *App) GetUserAgentHeader() string + func (app *App) HasBasicAuth() bool + func (app *App) SetUserAgentHeader(userAgentHeader string) v0.1.0 Oct 5, 2017 Changes in this version + const ConstCommentMentionTypeDepartment + const ConstCommentMentionTypeGroup + const ConstCommentMentionTypeUser + const DEFAULT_TIMEOUT + const FT_ASSIGNEE + const FT_CALC + const FT_CATEGORY + const FT_CHECK_BOX + const FT_CREATOR + const FT_CTIME + const FT_DATE + const FT_DATETIME + const FT_DECIMAL + const FT_FILE + const FT_GROUP + const FT_ID + const FT_LINK + const FT_MODIFIER + const FT_MTIME + const FT_MULTI_LINE_TEXT + const FT_MULTI_SELECT + const FT_ORGANIZATION + const FT_RADIO + const FT_RECNUM + const FT_REVISION + const FT_RICH_TEXT + const FT_SINGLE_LINE_TEXT + const FT_SINGLE_SELECT + const FT_STATUS + const FT_SUBTABLE + const FT_TIME + const FT_USER + var ErrInvalidResponse = errors.New("Invalid Response") + var ErrTimeout = errors.New("Timeout") + var ErrTooMany = errors.New("Too many records") + func IsBuiltinField(o interface{}) bool + type App struct + ApiToken string + AppId uint64 + Client *http.Client + Domain string + GuestSpaceId uint64 + Password string + Timeout time.Duration + User string + func (app *App) AddRecord(rec *Record) (id string, err error) + func (app *App) AddRecordComment(recordId uint64, comment *Comment) (id string, err error) + func (app *App) AddRecords(recs []*Record) ([]string, error) + func (app *App) DeleteComment(recordId uint64, commentId uint64) error + func (app *App) DeleteRecords(ids []uint64) error + func (app *App) Download(fileKey string) (*FileData, error) + func (app *App) Fields() (map[string]*FieldInfo, error) + func (app *App) GetAllRecords(fields []string) ([]*Record, error) + func (app *App) GetRecord(id uint64) (*Record, error) + func (app *App) GetRecordComments(recordID uint64, order string, offset, limit uint64) ([]Comment, error) + func (app *App) GetRecords(fields []string, query string) ([]*Record, error) + func (app *App) SetBasicAuth(user, password string) + func (app *App) UpdateRecord(rec *Record, ignoreRevision bool) error + func (app *App) UpdateRecordByKey(rec *Record, ignoreRevision bool, keyField string) error + func (app *App) UpdateRecords(recs []*Record, ignoreRevision bool) error + func (app *App) UpdateRecordsByKey(recs []*Record, ignoreRevision bool, keyField string) error + func (app *App) Upload(fileName, contentType string, data io.Reader) (key string, err error) + type AppError struct + Code string + Errors string + HttpStatus string + HttpStatusCode int + Id string + Message string + func (e *AppError) Error() string + type AssigneeField []User + func (f AssigneeField) JSONValue() interface{} + func (f AssigneeField) MarshalJSON() ([]byte, error) + type CalcField string + func (f CalcField) JSONValue() interface{} + func (f CalcField) MarshalJSON() ([]byte, error) + type CategoryField []string + func (f CategoryField) JSONValue() interface{} + func (f CategoryField) MarshalJSON() ([]byte, error) + type CheckBoxField []string + func (f CheckBoxField) JSONValue() interface{} + func (f CheckBoxField) MarshalJSON() ([]byte, error) + type Comment struct + CreatedAt string + Creator *ObjCreator + Id string + Mentions []*ObjMention + Text string + func DecodeRecordComments(b []byte) ([]Comment, error) + type CreationTimeField time.Time + func (t CreationTimeField) JSONValue() interface{} + func (t CreationTimeField) MarshalJSON() ([]byte, error) + type CreatorField User + func (f CreatorField) JSONValue() interface{} + func (f CreatorField) MarshalJSON() ([]byte, error) + type DateField struct + Date time.Time + Valid bool + func NewDateField(year int, month time.Month, day int) DateField + func (f DateField) JSONValue() interface{} + func (f DateField) MarshalJSON() ([]byte, error) + type DateTimeField struct + Time time.Time + Valid bool + func NewDateTimeField(year int, month time.Month, day, hour, min int) DateTimeField + func (f DateTimeField) JSONValue() interface{} + func (f DateTimeField) MarshalJSON() ([]byte, error) + type DecimalField string + func (f DecimalField) JSONValue() interface{} + func (f DecimalField) MarshalJSON() ([]byte, error) + type FieldInfo struct + Code string + Default interface{} + DefaultTime interface{} + Expression string + Fields []FieldInfo + Format string + Label string + MaxLength interface{} + MaxValue interface{} + Medium string + MinLength interface{} + MinValue interface{} + NoLabel bool + Options []string + Required bool + Separator bool + Type string + Unique bool + func (fi *FieldInfo) UnmarshalJSON(data []byte) error + type File struct + ContentType string + FileKey string + Name string + Size uint64 + func (f *File) MarshalJSON() ([]byte, error) + type FileData struct + ContentType string + Reader io.Reader + type FileField []File + func (f FileField) JSONValue() interface{} + func (f FileField) MarshalJSON() ([]byte, error) + type Group struct + Code string + Name string + type GroupField []Group + func (f GroupField) JSONValue() interface{} + func (f GroupField) MarshalJSON() ([]byte, error) + type LinkField string + func (f LinkField) JSONValue() interface{} + func (f LinkField) MarshalJSON() ([]byte, error) + type ModificationTimeField time.Time + func (t ModificationTimeField) JSONValue() interface{} + func (t ModificationTimeField) MarshalJSON() ([]byte, error) + type ModifierField User + func (f ModifierField) JSONValue() interface{} + func (f ModifierField) MarshalJSON() ([]byte, error) + type MultiLineTextField string + func (f MultiLineTextField) JSONValue() interface{} + func (f MultiLineTextField) MarshalJSON() ([]byte, error) + type MultiSelectField []string + func (f MultiSelectField) JSONValue() interface{} + func (f MultiSelectField) MarshalJSON() ([]byte, error) + type ObjCreator struct + Code string + Name string + type ObjMention struct + Code string + Type string + type Organization struct + Code string + Name string + type OrganizationField []Organization + func (f OrganizationField) JSONValue() interface{} + func (f OrganizationField) MarshalJSON() ([]byte, error) + type RadioButtonField string + func (f RadioButtonField) JSONValue() interface{} + func (f RadioButtonField) MarshalJSON() ([]byte, error) + type Record struct + Fields map[string]interface{} + func DecodeRecord(b []byte) (*Record, error) + func DecodeRecords(b []byte) ([]*Record, error) + func NewRecord(fields map[string]interface{}) *Record + func NewRecordWithId(id uint64, fields map[string]interface{}) *Record + func (rec Record) Id() uint64 + func (rec Record) MarshalJSON() ([]byte, error) + func (rec Record) Revision() int64 + type RecordNumberField string + func (f RecordNumberField) JSONValue() interface{} + func (f RecordNumberField) MarshalJSON() ([]byte, error) + type RichTextField string + func (f RichTextField) JSONValue() interface{} + func (f RichTextField) MarshalJSON() ([]byte, error) + type SingleLineTextField string + func (f SingleLineTextField) JSONValue() interface{} + func (f SingleLineTextField) MarshalJSON() ([]byte, error) + type SingleSelectField struct + String string + Valid bool + func (f SingleSelectField) JSONValue() interface{} + func (f SingleSelectField) MarshalJSON() ([]byte, error) + type StatusField string + func (f StatusField) JSONValue() interface{} + func (f StatusField) MarshalJSON() ([]byte, error) + type SubTableEntry struct + Id string + Value map[string]interface{} + type SubTableField []*Record + func (f SubTableField) JSONValue() interface{} + func (f SubTableField) MarshalJSON() ([]byte, error) + type TimeField struct + Time time.Time + Valid bool + func NewTimeField(hour, min int) TimeField + func (f TimeField) JSONValue() interface{} + func (f TimeField) MarshalJSON() ([]byte, error) + type UpdateKey struct + Field UpdateKeyField + FieldCode string + func (f UpdateKey) MarshalJSON() ([]byte, error) + type UpdateKeyField interface + JSONValue func() interface{} + type User struct + Code string + Name string + type UserField []User + func (f UserField) JSONValue() interface{} + func (f UserField) MarshalJSON() ([]byte, error)