Documentation ¶
Index ¶
- Constants
- func ErrorValueStringAsIDNotValid(value string) error
- func IDValidator(value string, errorReporter structure.ErrorReporter)
- func IsValidID(value string) bool
- func NewID() string
- func States() []string
- func ValidateID(value string) error
- type Accessor
- type Client
- type Create
- type Filter
- type Source
- type Sources
- type Update
Constants ¶
View Source
const ( StateConnected = "connected" StateDisconnected = "disconnected" StateError = "error" )
Variables ¶
This section is empty.
Functions ¶
func IDValidator ¶
func IDValidator(value string, errorReporter structure.ErrorReporter)
func ValidateID ¶
Types ¶
type Accessor ¶
type Accessor interface { List(ctx context.Context, userID string, filter *Filter, pagination *page.Pagination) (Sources, error) Create(ctx context.Context, userID string, create *Create) (*Source, error) Get(ctx context.Context, id string) (*Source, error) Update(ctx context.Context, id string, condition *request.Condition, update *Update) (*Source, error) Delete(ctx context.Context, id string, condition *request.Condition) (bool, error) }
type Create ¶
type Create struct { ProviderType *string `json:"providerType,omitempty"` ProviderName *string `json:"providerName,omitempty"` ProviderSessionID *string `json:"providerSessionId,omitempty"` State *string `json:"state,omitempty"` }
func (*Create) Parse ¶
func (c *Create) Parse(parser structure.ObjectParser)
type Filter ¶
type Filter struct { ProviderType *[]string ProviderName *[]string ProviderSessionID *[]string State *[]string }
func (*Filter) Parse ¶
func (f *Filter) Parse(parser structure.ObjectParser)
type Source ¶
type Source struct { ID *string `json:"id,omitempty" bson:"id,omitempty"` UserID *string `json:"userId,omitempty" bson:"userId,omitempty"` ProviderType *string `json:"providerType,omitempty" bson:"providerType,omitempty"` ProviderName *string `json:"providerName,omitempty" bson:"providerName,omitempty"` ProviderSessionID *string `json:"providerSessionId,omitempty" bson:"providerSessionId,omitempty"` State *string `json:"state,omitempty" bson:"state,omitempty"` Error *errors.Serializable `json:"error,omitempty" bson:"error,omitempty"` DataSetIDs *[]string `json:"dataSetIds,omitempty" bson:"dataSetIds,omitempty"` EarliestDataTime *time.Time `json:"earliestDataTime,omitempty" bson:"earliestDataTime,omitempty"` LatestDataTime *time.Time `json:"latestDataTime,omitempty" bson:"latestDataTime,omitempty"` LastImportTime *time.Time `json:"lastImportTime,omitempty" bson:"lastImportTime,omitempty"` CreatedTime *time.Time `json:"createdTime,omitempty" bson:"createdTime,omitempty"` ModifiedTime *time.Time `json:"modifiedTime,omitempty" bson:"modifiedTime,omitempty"` Revision *int `json:"revision,omitempty" bson:"revision,omitempty"` }
func (*Source) Normalize ¶
func (s *Source) Normalize(normalizer structure.Normalizer)
func (*Source) Parse ¶
func (s *Source) Parse(parser structure.ObjectParser)
type Update ¶
type Update struct { ProviderSessionID *string `json:"providerSessionId,omitempty"` State *string `json:"state,omitempty"` Error *errors.Serializable `json:"error,omitempty"` DataSetIDs *[]string `json:"dataSetIds,omitempty"` EarliestDataTime *time.Time `json:"earliestDataTime,omitempty"` LatestDataTime *time.Time `json:"latestDataTime,omitempty"` LastImportTime *time.Time `json:"lastImportTime,omitempty"` }
func (*Update) HasUpdates ¶
func (*Update) Normalize ¶
func (u *Update) Normalize(normalizer structure.Normalizer)
func (*Update) Parse ¶
func (u *Update) Parse(parser structure.ObjectParser)
Click to show internal directories.
Click to hide internal directories.