Skip to content

philippgille/apiomat-sdk-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apiomat-sdk-go

Build Status Build status Go Report Card GitHub Releases

Go (golang) SDK for ApiOmat

Under construction!

under-construction baby-gopher

Contents

aomx

Package aomx contains common functionality for sending HTTP requests to an ApiOmat server.

The "x" in aomx is for "cross" (cutting functionality), because the package is used by the aomc and aomu packages. Instead of using this package directly, you should use the packages aomc or aomu instead.

GoDoc

aomc

Package for handling "customer" resources during design-time

Usage

GoDoc

Example

package main

import (
    "fmt"

    "github.com/philippgille/apiomat-sdk-go/aomc"
)

func main() {
    client := aomc.NewDefaultClient("https://apiomat.yourcompany.com/yambas/rest", "john", "secret", "")
    classes, err := client.GetClasses("TestModule")
    if err != nil {
        panic(err)
    }
    fmt.Printf("%+v", classes) // [{AllowedRolesCreate:[] AllowedRolesGrant:[] ...} {...}]
}

Build

For updating the ApiOmat customer resource types such as dto.Class, you can turn example JSON into structs with gojson like this:

gojson -input "dto/class.json" -name "Class" -o "dto/class.go" -pkg "dto"

aomu

Package for handling "user" resources during runtime