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:
| Field | Type | Description |
|---|---|---|
ID | uint32 | Unique identifier for the app (auto-incremented) |
Name | string | Name of the app (must be unique and at least 2 characters) |
Version | string | Version number of the app |
Url | string | URL associated with the app |
IsActive | bool | Status of the app (active/inactive) |
CreatedAt | time.Time | Timestamp of when the app was created |
UpdatedAt | time.Time | Timestamp of the last update |
CreatedBy | uint32 | ID of the user who created the record |
UpdatedBy | uint32 | ID 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 GoAppmodel.AppId: A request message containing an app ID.AppList: A list ofAppmessages.AppRequest: Request to create or update an app.AppResponse: Response containing anApp.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.