fineract

package
v0.0.0-...-b0bbb88 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultFineractBaseURL is the default location of the Apache Fineract provider API
	DefaultFineractBaseURL = "https://demo.openmf.org/fineract-provider/api/v1"
	// DefaultTenant is the default tenant used for the Apache Fineract provider API
	DefaultTenant = "default"
	// DefaultUsername is the default username used for the Apache Fineract provider API
	DefaultUsername = "mifos"
	// DefaultPassword is the default password used for the Apache Fineract provider API
	DefaultPassword = "password"
)

Variables

View Source
var (
	// ErrConfigBaseURL is returned when the configuration BaseURL is not provided or is invalid
	ErrConfigBaseURL = errors.New("BaseURL must be absolute and valid")
	// ErrConfigTenant si returned when the configuration Tenant is invalid
	ErrConfigTenant = errors.New("Tenant must not be empty")
	// ErrConfigUsername si returned when the configuration Username is invalid
	ErrConfigUsername = errors.New("Username must not be empty")

	// DefaultConfig is a configuration for the demo system provided by Apache. This configuration should allow usage of the various functions without further configuration.
	DefaultConfig = Config{
		Client:   http.DefaultClient,
		BaseURL:  DefaultFineractBaseURL,
		Tenant:   DefaultTenant,
		Username: DefaultUsername,
		Password: DefaultPassword,
	}
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the configured connection to the fineract provider API

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient creates a new client for the Fineract provider API

func (*Client) GetSystemMinimalUsers

func (c *Client) GetSystemMinimalUsers() ([]userstore.SystemMinimalUser, error)

func (*Client) SetPassword

func (c *Client) SetPassword(id uint, password string) error

SetPassword sets the password for the user with the given id

type Config

type Config struct {
	Client   *http.Client
	BaseURL  string
	Tenant   string
	Username string
	Password string
}

Config holds the settings used to communicate with the fineract provider

Jump to

Keyboard shortcuts

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