Example #1
0
func (f *factory) SetConfig(config davconf.Config) {
	client := davclient.NewClient(config)

	f.cmds = map[string]Cmd{
		"put": newPutCmd(client),
		"get": newGetCmd(client),
	}
}
Example #2
0
func buildFactory() (client davclient.Client, factory Factory) {
	config := davconf.Config{User: "******"}
	client = davclient.NewClient(config)

	factory = NewFactory()
	factory.SetConfig(config)
	return
}
Example #3
0
func runGet(config davconf.Config, args []string) (err error) {
	davClient := davclient.NewClient(config)
	cmd := newGetCmd(davClient)
	return cmd.Run(args)
}