User Manual

Go Data Source User Guide

8/7/26
Go Data Source User Guide

The Go data source is one of the integration methods available on the Kuika platform that allows you to develop custom functions and business logic. Using Go, you can define custom operations within your application, create functions that accept parameters, and use these functions in application workflows.

With the Go data source, you can write custom code to address needs beyond the built-in actions, customize data processing workflows, and create reusable functions.

You may need to have an appropriate subscription plan to use the Go data source feature. You can upgrade your subscription to access more advanced development tools.

Add a Data Source Connection to Your App with Go

  1. Log in to the Kuika platform and open the project you’ll be working on from the Apps screen.
  2. Open the Data Sources module.
    • Here, you can view existing data sources and add a new one.
  3. In the left panel, click the + icon next to the Sources heading.
  4. In the Add a new Datasource screen that opens, select the Go option under the Development category.
  5. Enter a name for your data source.
  6. Click the CREATE button to complete the process.

Anatomy of the Go Action Modal

A. Top Menu

  • Title (Go Action): The modal’s title indicates that the created data source is a Go-based action.
  • CREATE Button: Used to save the Go data source you’ve created.
  • Close Button (X): Used to close the screen and exit the process.

B. Top Settings Area

  • userguide: A field where you can enter a description of what your function does. It helps other developers—or you in the future—remember the purpose of the code.
  • External Libraries (BETA): This area allows you to add external packages/modules for use in your Go code. It is currently labeled BETA.
  • Generate with AI: This option is used to automatically generate Go code with AI support. When enabled, you can receive code suggestions from the system.

C. Go Editor

  • This is the code editing area.
  • All custom functions are defined here.
  • Default example structure:
package main
func Greet(name string) string {
return “Hello, ” + name
}

This structure demonstrates the following:

  • The code begins with the `package main` declaration.
  • Functions are defined using the `func` keyword.
  • They can accept parameters.
  • The parameter type can be specified (e.g., `string`).
  • The return type can be defined at the end of the function signature (e.g., `string`).

D. TIDY UP Button

  • Located in the upper-right corner of the code editor.
  • It is used to format, indent, and make the written code more readable.

E. Test Console

  • This area, located at the bottom of the screen, is used to test the functions you’ve written.
  • In this section:
    • The function list is displayed.
    • Parameter input fields are provided.
    • The result output can be viewed.

Configuring Go Data Source Settings

Manual Code Writing

If “Generate with AI” is turned off, all code is written manually directly in the editor.

Example:

package main
func ToUpperCase(text string) string {
return strings.ToUpper(text)
}

Code Generation with AI

If you enable the “Generate with AI” feature, you can create code automatically by entering a description.

Example command:

Create a function that converts the entered text to uppercase.

Using External Libraries (BETA)

Through the External Libraries section, you can include additional packages in your project beyond the standard Go libraries. This feature is currently in the BETA phase.

Defining Parameters

You can add parameters to your functions.

Example:

package main
func Sum(value1 float64, value2 float64) float64 {
return value1 + value2
}

This function takes two numbers and returns their sum.

Specifying the Return Type

The data type to be returned must be defined at the end of the function signature.

Example types:

  • string
  • int
  • float64
  • bool
  • interface{}
  • []string (slice)

Testing Functions with the Test Console

After writing your code, you can use the Test Console section below.

  1. Select the function you want to test.
  2. Enter sample data into the parameter fields.
  3. Run the function.
  4. Check the return result.

Example:

package main
func Hello(name string) string {
return “Hello ” + name
}

Parameter: Kuika Expected output: Hello Kuika

Saving the Data Source with CREATE

After completing and testing your code, you can save the Go data source by clicking the CREATE button. The saved data source becomes available for use within the application.

Expected Output / Result

Once these steps are completed:

  • The Go data source is added to the Sources list.
  • The defined functions become available for use in the system.
  • Custom business rules can be managed via code.
  • A reusable function structure is created.
No items found.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar