sdk

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Raito SDK

Software License


Raito SDK

Note: This repository is still in an early stage of development. At this point, no contributions are accepted to the project yet.

This repository contains a simple SDK for Raito Cloud. It can be used to automate basic operations.

Installation

go get -u github.com/raito-io/sdk-go

Examples

package main

import (
    "context"
    "fmt"

    raito "github.com/raito-io/sdk-go"
)

func main() {
	ctx := context.Background()
	
	// Create a new RaitoClient 
	client := raito.NewClient(ctx, "your-domain", "your-user", "your-secret")
	
	// Access the AccessProviderClient 
	accessProviderClient := client.AccessProvider()
	ap, err := accessProviderClient.GetAccessProvider(ctx, "ap-id")
	if err != nil {
	    panic("ap does not exist: " + err.Error())
	}
	
	fmt.Printf("AccessProvider: %+v\n", ap)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithUrlOverride

func WithUrlOverride(urlOverride string) func(options *ClientOptions)

WithUrlOverride can be used to override the URL used to communicate with the Raito API.

Types

type ClientOptions

type ClientOptions struct {
	UrlOverride string
}

type RaitoClient

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

func NewClient

func NewClient(ctx context.Context, domain, user, secret string, ops ...func(options *ClientOptions)) *RaitoClient

NewClient creates a new RaitoClient with the given credentials.

func (*RaitoClient) AccessProvider

func (c *RaitoClient) AccessProvider() *services.AccessProviderClient

AccessProvider returns the AccessProviderClient

func (*RaitoClient) DataObject

func (c *RaitoClient) DataObject() *services.DataObjectClient

DataObject returns the DataObjectClient

func (*RaitoClient) DataSource

func (c *RaitoClient) DataSource() *services.DataSourceClient

DataSource returns the DataSourceClient

func (*RaitoClient) IdentityStore

func (c *RaitoClient) IdentityStore() *services.IdentityStoreClient

IdentityStore returns the IdentityStoreClient

func (*RaitoClient) Role

func (c *RaitoClient) Role() *services.RoleClient

Role returns the RoleClient

func (*RaitoClient) User

func (c *RaitoClient) User() *services.UserClient

User returns the UserClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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