本文整理匯總了Golang中github.com/Financial-Times/base-ft-rw-app-go/baseftrwapp.Service類的典型用法代碼示例。如果您正苦於以下問題:Golang Service類的具體用法?Golang Service怎麽用?Golang Service使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Service類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: writeJSONToService
func writeJSONToService(service baseftrwapp.Service, pathToJSONFile string, assert *assert.Assertions) {
f, err := os.Open(pathToJSONFile)
assert.NoError(err)
dec := json.NewDecoder(f)
inst, _, errr := service.DecodeJSON(dec)
assert.NoError(errr)
errrr := service.Write(inst)
assert.NoError(errrr)
}
示例2: makeCheck
func makeCheck(service baseftrwapp.Service, cr neoutils.CypherRunner) v1a.Check {
return v1a.Check{
BusinessImpact: "Cannot read/write subjects via this writer",
Name: "Check connectivity to Neo4j - neoUrl is a parameter in hieradata for this service",
PanicGuide: "TODO - write panic guide",
Severity: 1,
TechnicalSummary: fmt.Sprintf("Cannot connect to Neo4j instance %s with at least one subject loaded in it", cr),
Checker: func() (string, error) { return "", service.Check() },
}
}
示例3: deleteFinancialInstrumentViaService
func deleteFinancialInstrumentViaService(assert *assert.Assertions, financialInstrument baseftrwapp.Service, uuid string) {
_, err := financialInstrument.Delete(uuid)
assert.NoError(err)
}
示例4: deleteAllViaService
func deleteAllViaService(assert *assert.Assertions, peopleRW baseftrwapp.Service, organisationRW baseftrwapp.Service, membershipsRW baseftrwapp.Service, rolesRW baseftrwapp.Service) {
peopleRW.Delete("868c3c17-611c-4943-9499-600ccded71f3")
peopleRW.Delete("fa2ae871-ef77-49c8-a030-8d90eae6cf18")
peopleRW.Delete("84cec0e1-a866-47bd-9444-d74873b69786")
peopleRW.Delete("bdacd96e-d2f4-429f-bb61-462e40448409")
organisationRW.Delete("f21a5cc0-d326-4e62-b84a-d840c2209fee")
organisationRW.Delete("3e844449-b27f-40d4-b696-2ce9b6137133")
organisationRW.Delete("f9694ba7-eab0-4ce0-8e01-ff64bccb813c")
membershipsRW.Delete("6b278d36-5b30-46a3-b036-55902a9d31ac")
membershipsRW.Delete("668c103f-d8dc-4938-9324-9c60de726705")
membershipsRW.Delete("c739b972-f41d-43d2-b8d9-5848c92e17f6")
membershipsRW.Delete("177de04f-c09a-4d66-ab55-bb68496c9c28")
membershipsRW.Delete("9c50e77a-de8a-4f8c-b1dd-09c7730e2c70")
rolesRW.Delete("ff9e35f2-63e4-487a-87a4-d82535e047de")
rolesRW.Delete("c7063a20-5ca5-4f7a-8a96-47e946b5739e")
rolesRW.Delete("d8bbba91-8a87-4dee-bd1a-f79e8139e5c9")
rolesRW.Delete("5fcfec9c-8ff0-4ee2-9e91-f270492d636c")
}
示例5: deleteOrgViaService
func deleteOrgViaService(assert *assert.Assertions, organisationRW baseftrwapp.Service, uuid string) {
organisationRW.Delete(uuid)
}