Skip to content
This repository has been archived by the owner on Jul 1, 2019. It is now read-only.
/ izanami-go-client Public archive

Go client for izanami

License

Notifications You must be signed in to change notification settings

ovhlabs/izanami-go-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[WORK IN PROGRESS]

izanami-go-client

Go client for izanami

Usage

c, errNew := New("host", "clientID", "clientSecret")
if errNew != nil {
	return errNew
}
	
// List all features
features, errF := c.Feature().ListAll()
if errF != nil {
	return errF
}

// Create a feature
f := FeatureModel{
	ID: "my-feature",
	Enabled: true,
	Strategy: NoStrategy,
}
if err := c.Feature().Create(f); err != nil {
	return err
}

// Get a feature
myFeature, errF := c.Feature().Get(f.ID)
if errF != nil {
	return errF
}

// Update a feature
if err := c.Feature().Update(myFeature); err != nil {
	return err
}

// Check a feature
check, err := c.Feature().CheckWithoutContext(feat.ID)
if err != nil {
	return err
}

// Delete a feature
if err := c.Feature().Delete(myFeature.ID); err != nil {
	return err
}

Releases

No releases published

Packages

No packages published

Languages