handlers

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.0.1"

Variables

This section is empty.

Functions

func FromJSON

func FromJSON(i interface{}, r io.Reader) error

func ToJSON

func ToJSON(i interface{}, w io.Writer) error

Types

type BulkCreateJobResult

type BulkCreateJobResult struct {
	ID              string  `json:"id"`
	Operation       string  `json:"operation"`
	Object          string  `json:"object"`
	CreatedByID     string  `json:"createdById,omitempty"`
	CreatedDate     string  `json:"createdDate,omitempty"`
	SystemModstamp  string  `json:"systemModstamp,omitempty"`
	State           string  `json:"state,omitempty"`
	ConcurrencyMode string  `json:"concurrencyMode,omitempty"`
	ContentType     string  `json:"contentType,omitempty"`
	APIVersion      float64 `json:"apiVersion,omitempty"`
	ContentURL      string  `json:"contentUrl,omitempty"`
	LineEnding      string  `json:"lineEnding,omitempty"`
	ColumnDelimiter string  `json:"columnDelimiter,omitempty"`
}

type BulkInsert

type BulkInsert struct {
	AllOrNone  bool        `json:"allOrNone"`
	Operations []Operation `json:"operations"`
}

type BulkInsertResult

type BulkInsertResult struct {
	HasErrors bool        `json:"hasErrors,omitempty"`
	Results   interface{} `json:"results"`
}

type CustomRecords

type CustomRecords struct {
	Id             string        `json:"Id"`
	MeasureNameNew string        `json:"Measure_Name_New__c,omitempty"`
	RecTypeName    string        `json:"Record_Type_Name__c,omitempty"`
	RecTypeId      string        `json:"Record_Type_Id__c,omitempty"`
	ProgRec        ProgramRecord `json:"Program__r,omitempty"`
}

type CustomRecordsMap

type CustomRecordsMap map[string][]CustomRecords

type EquipmentRecord

type EquipmentRecord struct {
	ProgName    string `json:"Program_Name__c"`
	MeasureName string `json:"Measure_Description__c"`
	PicklistVal string `json:"Equipment_Type__c"`
}

type EquipmentRecords

type EquipmentRecords []EquipmentRecord

type FieldAPILabelMapping

type FieldAPILabelMapping map[string]string

type FieldMetadata

type FieldMetadata struct {
	Name  string `json:"name"`
	Label string `json:"label"`
}

type Handler

type Handler struct {
	UserAgent string
	// contains filtered or unexported fields
}

func GetHandler

func GetHandler(clientID, secret, username, url, v, path, sfEnv string, rbmqCfg *rbmq.Config, l *zap.Logger) (*Handler, error)

func (*Handler) BuildDynamicMapping

func (h *Handler) BuildDynamicMapping(objectAPI string) (map[string]string, error)

func (*Handler) CreateBulkMappedRecords

func (h *Handler) CreateBulkMappedRecords(w http.ResponseWriter, r *http.Request)

func (*Handler) CreateMappedRecords

func (h *Handler) CreateMappedRecords(w http.ResponseWriter, r *http.Request)

func (*Handler) GetAccessToken

func (h *Handler) GetAccessToken() error

func (*Handler) GetPickBasedMappingRec

func (h *Handler) GetPickBasedMappingRec(w http.ResponseWriter, r *http.Request)

func (*Handler) QueryRecords

func (h *Handler) QueryRecords(w http.ResponseWriter, r *http.Request)

type MetadataResponse

type MetadataResponse struct {
	Fields []FieldMetadata `json:"fields"`
}

type Operation

type Operation struct {
	Type    string   `json:"type"`
	Records []Record `json:"records"`
}

type Payload

type Payload struct {
	SObject             string                   `json:"sObject,omitempty"`
	FieldName           string                   `json:"fieldName,omitempty"`
	Query               string                   `json:"query,omitempty"`
	RecTypeID           string                   `json:"recTypeId,omitempty"`
	Records             []CustomRecords          `json:"records,omitempty"`
	PicklistMapToInsert PicklistMappedResp       `json:"picklist_map_insert,omitempty"`
	TargetSObject       string                   `json:"targetsObject,omitempty"`
	RecordsToInsert     []map[string]interface{} `json:"rec_to_insert,omitempty"`
}

type PicklistMappedResp

type PicklistMappedResp struct {
	Eqs  EquipmentRecords      `json:"equipment_records,omitempty"`
	Recs RecommendationRecords `json:"recommendation_records,omitempty"`
}

type PicklistQueryResponse

type PicklistQueryResponse struct {
	PicklistValues []PicklistValue `json:"Values"`
}

type PicklistValue

type PicklistValue struct {
	PickValues string `json:"value"`
}

type ProgramRecord

type ProgramRecord struct {
	Name string `json:"Name,omitempty"`
}

type QueryResponse

type QueryResponse struct {
	TotalSize int             `json:"totalSize"`
	Done      bool            `json:"done"`
	Records   []CustomRecords `json:"records"`
}

type RecommendationRecord

type RecommendationRecord struct {
	ProgName    string `json:"Program_Name__c"`
	MeasureName string `json:"Measure_Description__c"`
	PicklistVal string `json:"Recommendation__c"`
}

type RecommendationRecords

type RecommendationRecords []RecommendationRecord

type Record

type Record struct {
	APIName string      `json:"apiName"`
	Fields  interface{} `json:"fields"`
}

Jump to

Keyboard shortcuts

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