Documentation ¶
Index ¶
- Constants
- func ExtractTokenInfo(request http.Request) (string, string, []string)
- func GetConfLoader() *onion.Onion
- func GetConfig() *config.Config
- func GetLogger() zerolog.Logger
- func Init(appName string)
- func InitDaemon(appName string)
- func IsQueryParamsEquals(input *context.BeegoInput, name string, val interface{}) bool
- func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string, ...) *config.Config
- func ToScheduler(m interface{}) (n *workflow_execution.WorkflowSchedule)
- type Claims
- type Filters
- type IDTokenClaims
- type LibData
- func (l *LibData) ToCollaborativeArea() *collaborative_area.CollaborativeArea
- func (l *LibData) ToComputeResource() *resources.ComputeResource
- func (l *LibData) ToDataResource() *resources.DataResource
- func (l *LibData) ToOrder() *order.Order
- func (l *LibData) ToPeer() *peer.Peer
- func (l *LibData) ToProcessingResource() *resources.ProcessingResource
- func (l *LibData) ToRule() *rule.Rule
- func (l *LibData) ToStorageResource() *resources.StorageResource
- func (l *LibData) ToWorkflow() *w2.Workflow
- func (l *LibData) ToWorkflowExecution() *workflow_execution.WorkflowExecutions
- func (l *LibData) ToWorkflowResource() *resources.WorkflowResource
- func (l *LibData) ToWorkspace() *workspace.Workspace
- type LibDataEnum
- type LibDataShallow
- type Request
- func (r *Request) CheckBooking(wfID string, start string, end string, durationInS float64, cron string) bool
- func (r *Request) CopyOne(object map[string]interface{}) (data LibData)
- func (r *Request) DeleteOne(id string) (data LibData)
- func (r *Request) DraftOrder(scheduler *workflow_execution.WorkflowSchedule) (*order.Order, error)
- func (r *Request) LoadAll(isDraft bool) (data LibDataShallow)
- func (r *Request) LoadOne(id string) (data LibData)
- func (r *Request) PaymentTunnel(o *order.Order, scheduler *workflow_execution.WorkflowSchedule) error
- func (r *Request) Schedule(wfID string, start string, end string, durationInS float64, cron string) (*workflow_execution.WorkflowSchedule, error)
- func (r *Request) Search(filters *dbs.Filters, word string, isDraft bool) (data LibDataShallow)
- func (r *Request) StoreOne(object map[string]interface{}) (data LibData)
- func (r *Request) UpdateOne(set map[string]interface{}, id string) (data LibData)
- type SessionClaims
Constants ¶
const ( INVALID LibDataEnum = iota DATA_RESOURCE = tools.DATA_RESOURCE PROCESSING_RESOURCE = tools.PROCESSING_RESOURCE STORAGE_RESOURCE = tools.STORAGE_RESOURCE COMPUTE_RESOURCE = tools.COMPUTE_RESOURCE WORKFLOW_RESOURCE = tools.WORKFLOW_RESOURCE WORKFLOW = tools.WORKFLOW WORKSPACE = tools.WORKSPACE WORKFLOW_EXECUTION = tools.WORKFLOW_EXECUTION PEER = tools.PEER COLLABORATIVE_AREA = tools.COLLABORATIVE_AREA RULE = tools.RULE BOOKING = tools.BOOKING ORDER = tools.ORDER )
init accessible constant to retrieve data from the database
Variables ¶
This section is empty.
Functions ¶
func GetConfLoader ¶
func InitDaemon ¶
func InitDaemon(appName string)
func IsQueryParamsEquals ¶
func IsQueryParamsEquals(input *context.BeegoInput, name string, val interface{}) bool
func SetConfig ¶
func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string, logLevel string) *config.Config
SetConfig will set the config and create a logger according to app configuration and initialize mongo accessor
* @param url string * @param database string * @param natsUrl string * @param lokiUrl string * @param logLevel string * @return *Config
func ToScheduler ¶
func ToScheduler(m interface{}) (n *workflow_execution.WorkflowSchedule)
Types ¶
type IDTokenClaims ¶
type LibData ¶
type LibData struct { Data utils.DBObject `bson:"data" json:"data"` Code int `bson:"code" json:"code"` Err string `bson:"error" json:"error"` }
model to define the data structure
func (*LibData) ToCollaborativeArea ¶
func (l *LibData) ToCollaborativeArea() *collaborative_area.CollaborativeArea
func (*LibData) ToComputeResource ¶
func (l *LibData) ToComputeResource() *resources.ComputeResource
func (*LibData) ToDataResource ¶
func (l *LibData) ToDataResource() *resources.DataResource
func (*LibData) ToProcessingResource ¶
func (l *LibData) ToProcessingResource() *resources.ProcessingResource
func (*LibData) ToStorageResource ¶
func (l *LibData) ToStorageResource() *resources.StorageResource
func (*LibData) ToWorkflow ¶
func (*LibData) ToWorkflowExecution ¶
func (l *LibData) ToWorkflowExecution() *workflow_execution.WorkflowExecutions
func (*LibData) ToWorkflowResource ¶
func (l *LibData) ToWorkflowResource() *resources.WorkflowResource
func (*LibData) ToWorkspace ¶
type LibDataEnum ¶
type LibDataEnum int
type LibDataShallow ¶
type LibDataShallow struct { Data []utils.ShallowDBObject `bson:"data" json:"data"` Code int `bson:"code" json:"code"` Err string `bson:"error" json:"error"` }
model to define the shallow data structure
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func NewRequest(collection LibDataEnum, user string, peerID string, groups []string, caller *tools.HTTPCaller) *Request
func (*Request) CheckBooking ¶
func (*Request) CopyOne ¶
* CopyOne will copy one data from the database * @param collection LibDataEnum * @param object map[string]interface{} * @param c ...*tools.HTTPCaller * @return data LibData
func (*Request) DeleteOne ¶
* DeleteOne will delete one data from the database * @param collection LibDataEnum * @param id string * @param c ...*tools.HTTPCaller * @return data LibData
func (*Request) DraftOrder ¶
func (r *Request) DraftOrder(scheduler *workflow_execution.WorkflowSchedule) (*order.Order, error)
func (*Request) LoadAll ¶
func (r *Request) LoadAll(isDraft bool) (data LibDataShallow)
* LoadAll will load all the data from the database * @param collection LibDataEnum * @param c ...*tools.HTTPCaller * @return data LibDataShallow
func (*Request) LoadOne ¶
* LoadOne will load one data from the database * @param collection LibDataEnum * @param id string * @param c ...*tools.HTTPCaller * @return data LibData
func (*Request) PaymentTunnel ¶
func (r *Request) PaymentTunnel(o *order.Order, scheduler *workflow_execution.WorkflowSchedule) error
func (*Request) Schedule ¶
func (r *Request) Schedule(wfID string, start string, end string, durationInS float64, cron string) (*workflow_execution.WorkflowSchedule, error)
func (*Request) Search ¶
* Search will search for the data in the database * @param filters *dbs.Filters * @param word string * @param collection LibDataEnum * @param c ...*tools.HTTPCaller * @return data LibDataShallow
func (*Request) StoreOne ¶
* StoreOne will store one data from the database * @param collection LibDataEnum * @param object map[string]interface{} * @param c ...*tools.HTTPCaller * @return data LibData
type SessionClaims ¶
type SessionClaims struct { AccessToken map[string]interface{} `json:"access_token"` IDToken IDTokenClaims `json:"id_token"` }
SessionClaims struct