Skip to main content

App Service

This project defines an App model and associated services for managing application metadata. It includes a Go data model and a Protocol Buffers definition for gRPC communication.

App Model (app.go)​

The App struct defines the data model for applications:

FieldTypeDescription
IDuint32Unique identifier for the app (auto-incremented)
NamestringName of the app (must be unique and at least 2 characters)
VersionstringVersion number of the app
UrlstringURL associated with the app
IsActiveboolStatus of the app (active/inactive)
CreatedAttime.TimeTimestamp of when the app was created
UpdatedAttime.TimeTimestamp of the last update
CreatedByuint32ID of the user who created the record
UpdatedByuint32ID of the user who last updated the record

gRPC Service (app.proto)​

The .proto file defines a gRPC service for interacting with App records. The core service and messages include:

Messages​

  • App: Mirrors the structure of the Go App model.
  • AppId: A request message containing an app ID.
  • AppList: A list of App messages.
  • AppRequest: Request to create or update an app.
  • AppResponse: Response containing an App.
  • Empty: A placeholder message for methods that don’t require input.

Services​

  • CreateApp(AppRequest) returns (AppResponse)
  • GetApp(AppId) returns (AppResponse)
  • ListApps(Empty) returns (AppList)
  • UpdateApp(AppRequest) returns (AppResponse)
  • DeleteApp(AppId) returns (Empty)

These services enable full CRUD (Create, Read, Update, Delete) operations on the App entity.