src/plugin/vault/pachyderm/backend.go
func Factory(ctx context.Context, c *logical.BackendConfig) (logical.Backend, error) {
	result := &backend{}
	result.Backend = &framework.Backend{
		BackendType: logical.TypeLogical,
		PathsSpecial: &logical.Paths{
			Unauthenticated: []string{"login"},
		},
		Paths: []*framework.Path{
			result.configPath(),
			result.loginPath(),
			result.versionPath(),
		},
		Secrets: []*framework.Secret{{
			Type: "pachyderm_tokens",
			Fields: map[string]*framework.FieldSchema{
				"user_token": &framework.FieldSchema{
					Type:        framework.TypeString,
					Description: "Pachyderm authentication tokens",
				},
			},
			Renew:  result.Renew,
			Revoke: result.Revoke,
		}},
	}
	if err := result.Setup(ctx, c); err != nil {
		return nil, err
	}
	return result, nil
}
func Factory(ctx context.Context, c *logical.BackendConfig) (logical.Backend, error) {
	result := &backend{}
	result.Backend = &framework.Backend{
		BackendType: logical.TypeLogical,
		PathsSpecial: &logical.Paths{
			Unauthenticated: []string{"login"},
		},
		Paths: []*framework.Path{
			result.configPath(),
			result.loginPath(),
			result.versionPath(),
		},
		Secrets: []*framework.Secret{{
			Type: "pachyderm_tokens",
			Fields: map[string]*framework.FieldSchema{
				"user_token": &framework.FieldSchema{
					Type:        framework.TypeString,
					Description: "Pachyderm authentication tokens",
				},
			},
			Renew:  result.Renew,
			Revoke: result.Revoke,
		}},
	}
	if err := result.Setup(ctx, c); err != nil {
		return nil, err
	}
	return result, nil
}
// Factory is the function that the Pachyderm Vault plugin exports to let Vault
// create/refresh/revoke Pachyderm tokens