Documentation
¶
Index ¶
- Constants
- Variables
- func BuildNumberInt() int
- func GetAutherOutOfContext(ctx context.Context) auth.Auther
- type BrokerLogMessageRequiredFields
- type BrokerLoginMessage
- type BrokerRecordLogMessage
- type BytesJSON
- type CreateOptions
- type Creator
- type DeleteOptions
- type Domain
- type Field
- type Fielder
- type Lister
- type LogEntity
- type Login
- type LoginAttempt
- type NullInt
- type NullString
- type NullTime
- type ObjectMetadata
- func (o *ObjectMetadata) GetAllFields() []string
- func (o *ObjectMetadata) GetAllScopeNames() []string
- func (o *ObjectMetadata) GetChildScopeNames() []string
- func (o *ObjectMetadata) GetDefaultFields() []string
- func (o *ObjectMetadata) GetMainScopeName() string
- func (o *ObjectMetadata) GetParentScopeName() string
- func (*ObjectMetadata) SetAllFieldsToTrue(o ObjectMetadata) *ObjectMetadata
- type ObjectMetadatter
- type Pager
- type RabbitMessage
- type SearchOptions
- func (s *SearchOptions) CurrentTime() time.Time
- func (s *SearchOptions) GetAuthOpts() auth.Auther
- func (s *SearchOptions) GetPage() int
- func (s *SearchOptions) GetSize() int
- func (s *SearchOptions) GetSort() string
- func (s *SearchOptions) SearchDerivedOptionByField(field string) *SearchOptions
- func (s *SearchOptions) SetAuthOpts(a auth.Auther) *SearchOptions
- type Searcher
- type Sorter
- type Status
- type TimelineCounter
- type UpdateOptions
- type Updator
- type User
Constants ¶
View Source
const ( APP_SERVICE_NAME = "cases" NAMESPACE_NAME = "webitel" )
View Source
const ( ScopeDictionary = "dictionaries" ScopeCases = "cases" ScopeCalls = "calls" ScopeCaseComments = "case_comments" )
View Source
const (
DefaultSearchSize = 10
)
DeafaultSearchSize is a constant integer == 10.
Variables ¶
View Source
var ( CurrentVersion string = versions[0] BuildNumber string )
View Source
var LoginAttemptFields = struct { Id string Success string AuthType string UserIp string Date string User string UserName string UserId string UserAgent string DomainId string DomainName string Details string }{ Id: "id", Success: "success", AuthType: "auth_type", UserIp: "user_ip", Date: "date", User: "user", UserId: "user_id", UserName: "user_name", UserAgent: "user_agent", DomainId: "domain_id", DomainName: "domain_name", Details: "details", }
Functions ¶
func BuildNumberInt ¶
func BuildNumberInt() int
Types ¶
type BrokerLoginMessage ¶
type BrokerLoginMessage struct { Login *Login `json:"login,omitempty"` Status *Status `json:"status,omitempty"` AuthType string `json:"type,omitempty"` Agent string `json:"agent,omitempty"` From string `json:"from,omitempty"` Date int64 `json:"date,omitempty"` IsNew bool `json:"isNew,omitempty"` }
func (*BrokerLoginMessage) ConvertToDatabaseModel ¶
func (m *BrokerLoginMessage) ConvertToDatabaseModel() (*LoginAttempt, cerror.AppError)
type BrokerRecordLogMessage ¶
type BrokerRecordLogMessage struct { Records []*LogEntity `json:"records,omitempty"` BrokerLogMessageRequiredFields `json:"requiredFields"` }
type CreateOptions ¶
type CreateOptions struct { //Session *session.Session context.Context // binding Time time.Time // output Fields []string DerivedSearchOpts map[string]*SearchOptions UnknownFields []string // filters Ids []int64 // ParentID is the attribute to represent parent object, that creation process connected to ParentID int64 // ChildID is the attribute to represent child object, that creation process connect ChildID int64 Auth auth.Auther }
func NewCreateOptions ¶
func NewCreateOptions(ctx context.Context, creator Creator, objMetadata ObjectMetadatter) (*CreateOptions, error)
func (*CreateOptions) CurrentTime ¶
func (rpc *CreateOptions) CurrentTime() time.Time
func (*CreateOptions) GetAuthOpts ¶
func (s *CreateOptions) GetAuthOpts() auth.Auther
func (*CreateOptions) SetAuthOpts ¶
func (s *CreateOptions) SetAuthOpts(a auth.Auther) *CreateOptions
type DeleteOptions ¶
type DeleteOptions struct { Time time.Time context.Context //Session *session.Session IDs []int64 ID int64 ParentID int64 Auth auth.Auther }
func NewDeleteOptions ¶
func NewDeleteOptions(ctx context.Context, metadatter ObjectMetadatter) (*DeleteOptions, error)
NewDeleteOptions initializes a DeleteOptions instance with the current session, context, and current time.
func (*DeleteOptions) CurrentTime ¶
func (rpc *DeleteOptions) CurrentTime() time.Time
CurrentTime sets and returns the current time if Time is zero.
func (*DeleteOptions) GetAuthOpts ¶
func (s *DeleteOptions) GetAuthOpts() auth.Auther
func (*DeleteOptions) SetAuthOpts ¶
func (s *DeleteOptions) SetAuthOpts(a auth.Auther) *DeleteOptions
type Login ¶
type Login struct { Id *guid.UUID `json:"id,omitempty"` Context map[string]string `json:"context,omitempty"` Domain *Domain `json:"domain,omitempty"` User *User `json:"user,omitempty"` CreatedAt int64 `json:"created_at,omitempty"` ExpiresAt int64 `json:"expires_at,omitempty"` MaxAge int64 `json:"max_age,omitempty"` }
type LoginAttempt ¶
type NullString ¶
type NullString string
func NewNullString ¶
func NewNullString(i string) *NullString
func (*NullString) Scan ¶
func (t *NullString) Scan(v interface{}) error
Scan native value decoder function
type NullTime ¶
func NewNullTime ¶
func (*NullTime) ToMilliseconds ¶
type ObjectMetadata ¶
type ObjectMetadata struct {
// contains filtered or unexported fields
}
func (*ObjectMetadata) GetAllFields ¶
func (o *ObjectMetadata) GetAllFields() []string
func (*ObjectMetadata) GetAllScopeNames ¶
func (o *ObjectMetadata) GetAllScopeNames() []string
func (*ObjectMetadata) GetChildScopeNames ¶
func (o *ObjectMetadata) GetChildScopeNames() []string
func (*ObjectMetadata) GetDefaultFields ¶
func (o *ObjectMetadata) GetDefaultFields() []string
func (*ObjectMetadata) GetMainScopeName ¶
func (o *ObjectMetadata) GetMainScopeName() string
func (*ObjectMetadata) GetParentScopeName ¶
func (o *ObjectMetadata) GetParentScopeName() string
func (*ObjectMetadata) SetAllFieldsToTrue ¶
func (*ObjectMetadata) SetAllFieldsToTrue(o ObjectMetadata) *ObjectMetadata
SetAllFieldsToTrue implements ObjectMetadatter.
type ObjectMetadatter ¶
type ObjectMetadatter interface { GetDefaultFields() []string GetAllFields() []string GetMainScopeName() string GetParentScopeName() string GetChildScopeNames() []string GetAllScopeNames() []string SetAllFieldsToTrue(o ObjectMetadata) *ObjectMetadata }
func NewObjectMetadata ¶
func NewObjectMetadata(mainScope string, parentScope string, fields []*Field, childMetadata ...ObjectMetadatter) ObjectMetadatter
type RabbitMessage ¶
type SearchOptions ¶
type SearchOptions struct { Time time.Time context.Context //Session *session.Session // filters Filter map[string]any Search string IDs []int64 ParentId int64 // output Fields []string UnknownFields []string DerivedSearchOpts map[string]*SearchOptions // paging Page int Size int Sort string // filtering by single id ID int64 // Auth opts Auth auth.Auther }
func NewLocateOptions ¶
func NewLocateOptions(ctx context.Context, locator Fielder, objMetadata ObjectMetadatter) (*SearchOptions, error)
func NewSearchOptions ¶
func NewSearchOptions(ctx context.Context, searcher Lister, objMetadata ObjectMetadatter) (*SearchOptions, error)
func (*SearchOptions) CurrentTime ¶
func (s *SearchOptions) CurrentTime() time.Time
func (*SearchOptions) GetAuthOpts ¶
func (s *SearchOptions) GetAuthOpts() auth.Auther
func (*SearchOptions) GetPage ¶
func (s *SearchOptions) GetPage() int
func (*SearchOptions) GetSize ¶
func (s *SearchOptions) GetSize() int
func (*SearchOptions) GetSort ¶
func (s *SearchOptions) GetSort() string
func (*SearchOptions) SearchDerivedOptionByField ¶
func (s *SearchOptions) SearchDerivedOptionByField(field string) *SearchOptions
func (*SearchOptions) SetAuthOpts ¶
func (s *SearchOptions) SetAuthOpts(a auth.Auther) *SearchOptions
type TimelineCounter ¶
type UpdateOptions ¶
type UpdateOptions struct { Time time.Time context.Context // Session *session.Session // output Fields []string UnknownFields []string DerivedSearchOpts map[string]*SearchOptions // update Mask []string // filters ParentID int64 IDs []int64 // ID int64 Auth auth.Auther }
UpdateOptions defines options for updating an entity with fields, mask, filter, and pagination
func NewUpdateOptions ¶
func NewUpdateOptions(ctx context.Context, req Updator, objMetadata ObjectMetadatter) (*UpdateOptions, error)
NewUpdateOptions initializes UpdateOptions with values from a context and an Updator-compliant struct
func (*UpdateOptions) CurrentTime ¶
func (opts *UpdateOptions) CurrentTime() time.Time
CurrentTime ensures Time is set to the current time if not already set, and returns it
func (*UpdateOptions) GetAuthOpts ¶
func (s *UpdateOptions) GetAuthOpts() auth.Auther
func (*UpdateOptions) SetAuthOpts ¶
func (s *UpdateOptions) SetAuthOpts(a auth.Auther) *UpdateOptions
Source Files
¶
Click to show internal directories.
Click to hide internal directories.