v

package
v0.0.0-...-48b9d42 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(c *gin.Context, v interface{})

func JSONError

func JSONError(c *gin.Context, code Code, format string, args ...interface{})

Types

type AddMembersRequest

type AddMembersRequest struct {
	// in: header
	// name: organizationId
	// required: true
	OrganizationId int64 `json:"organizationId"`

	// in: body
	Body []OrganizatoinMember
}

swagger:parameters addMembersRequest

type AddMembersResponse

type AddMembersResponse struct {
	// Data is data of the response of adding member.
	//
	// required: true
	Data AddMembersResponseData `json:"data"`
}

The response payload sent when adding memebers request.

swagger:model addMembersResponse

type AddMembersResponseData

type AddMembersResponseData struct {
	Created                  []string `json:"created,omitempty"`
	EmailAlreadyExists       []string `json:"email_already_exists,omitempty"`
	PhoneMobileAlreadyExists []string `json:"phone_mobile_already_exists,omitempty"`
}

type Code

type Code string

Generic Error Code

Code responses is error code when an error occurred.

Success Code = "Success" BadRequest Code = "BadRequest" InvalidOrganizationID Code = "InvalidOrganizationID" InvalidOrganization Code = "InvalidOrganization" InvalidOrgUser Code = "InvalidOrgUser" EmptyOrgUserList Code = "EmptyOrgUserList" FailedToDeleteOrg Code = "FailedToDeleteOrg" FailedToAddSubsidiary Code = "FailedToAddSubsidiary" InvalidUserInfo Code = "InvalidUserInfo" InvalidUserProfile Code = "InvalidUserProfile" GrpcConnectionFailed Code = "GrpcConnectionFailed" InvalidCrtOrKey Code = "InvalidCrtOrKey" Forbidden Code = "Forbidden" FailedToPostFile Code = "FailedToPostFile" FileCantParsed Code = "FileCantParsed" SheetNotFound Code = "SheetNotFound" DataError Code = "DataError" OrgUserDataEmpty Code = "OrgUserDataEmpty" TemplateError Code = "TemplateError" MemberLimit100 Code = "MemberLimit100" EmptyEmailAddress Code = "EmptyEmailAddress" InvalidEmailFormat Code = "InvalidEmailFormat" InvalidPassword Code = "InvalidPassword" InvalidCompany Code = "InvalidCompany" InvalidFeature Code = "InvalidFeature" InvalidFeatureDefaultRole Code = "InvalidFeatureDefaultRole" InvalidApp Code = "InvalidApp" InvalidSubOrder Code = "InvalidSubOrder" InvalidAppRole Code = "InvalidAppRole" InvalidPlan Code = "InvalidPlan" InvalidSubscription Code = "InvalidSubscription" InvalidOrganisationConfigs Code = "InvalidOrganisationConfigs" InvalidPpPRelation Code = "InvalidPpPRelation" InvalidPrePolicy Code = "InvalidPrePolicy" InvalidPhoneNumber Code = "InvalidPhoneNumber" InvalidContactPerson Code = "InvalidContactPerson" InvalidCountry Code = "InvalidCountry" DuplicatedEmailAddress Code = "DuplicatedEmailAddress" DuplicatedMember Code = "DuplicatedMember" EmptyMemberName Code = "EmptyMemberName" TheEmailAddressAlreadyExists Code = "TheEmailAddressAlreadyExists" NotMatchedWithEmail Code = "NotMatchedWithEmail" MaxMemberLimitError Code = "MaxMemberLimitError" DataValidationError Code = "DataValidationError" FailedToCreateUser Code = "FailedToCreateUser" FailedToCreateSubOrder Code = "FailedToCreateSubscriptionOrder" FailedToCreateOrganizationApp Code = "FailedToCreateOrganizationApp" FailedToAddUserToFreePlan Code = "FailedToAddUserToFreePlan" FailedToAddUserToAdmin Code = "FailedToAddUserToAdmin" FailedToAddSubscription Code = "FailedToAddSubscription" FailedToCreateUserTags Code = "FailedToCreateUserTags" FailedToExecuteCallback Code = "FailedToExecuteCallback" FailedToSyncOrg Code = "FailedToSyncOrg" FailedToGetCompany Code = "FailedToGetCompany" FailedToSyncOrgApp Code = "FailedToSyncOrgApp" NotTheCreator Code = "NotTheCreator" FailedToConvertPolicy Code = "FailedToConvertPolicy" FailedToSyncPolicy Code = "FailedToSyncPolicy" FailedToUpsertOrg Code = "FailedToUpsertOrg" FailedToSyncAc Code = "FailedToSyncAc" FailedToAddedDefaultPolicy Code = "FailedToAddedDefaultPolicy" FailedToUpsertAcGroups Code = "FailedToUpsertAcGroups" FailedToSyncSubscriptions Code = "FailedToSyncSubscriptions" EmailAlreadyExists Code = "EmailAlreadyExists" MobileAlreadyExists Code = "MobileAlreadyExists" InternalError Code = "InternalError" OrgAlreadyExists Code = "OrgAlreadyExists" NotBelongThisOrg Code = "NotBelongThisOrg" FailedToTransferCreator Code = "FailedToTransferCreator" FailedToRemoveOrgMember Code = "FailedToRemoveOrgMember" FailedToGetAcGroup Code = "FailedToGetAcGroup"

swagger:model code

const (
	Success                       Code = "Success"
	BadRequest                    Code = "BadRequest"
	InvalidOrganizationID         Code = "InvalidOrganizationID"
	InvalidOrganization           Code = "InvalidOrganization"
	InvalidOrgUser                Code = "InvalidOrgUser"
	EmptyOrgUserList              Code = "EmptyOrgUserList"
	FailedToDeleteOrg             Code = "FailedToDeleteOrg"
	FailedToAddSubsidiary         Code = "FailedToAddSubsidiary"
	InvalidUserInfo               Code = "InvalidUserInfo"
	InvalidUserProfile            Code = "InvalidUserProfile"
	GrpcConnectionFailed          Code = "GrpcConnectionFailed"
	InvalidCrtOrKey               Code = "InvalidCrtOrKey"
	Forbidden                     Code = "Forbidden"
	FailedToPostFile              Code = "FailedToPostFile"
	FileCantParsed                Code = "FileCantParsed"
	SheetNotFound                 Code = "SheetNotFound"
	DataError                     Code = "DataError"
	OrgUserDataEmpty              Code = "OrgUserDataEmpty"
	TemplateError                 Code = "TemplateError"
	MemberLimit100                Code = "MemberLimit100"
	EmptyEmailAddress             Code = "EmptyEmailAddress"
	InvalidEmailFormat            Code = "InvalidEmailFormat"
	InvalidPassword               Code = "InvalidPassword"
	InvalidCompany                Code = "InvalidCompany"
	InvalidFeature                Code = "InvalidFeature"
	InvalidFeatureDefaultRole     Code = "InvalidFeatureDefaultRole"
	InvalidApp                    Code = "InvalidApp"
	InvalidSubOrder               Code = "InvalidSubOrder"
	InvalidAppRole                Code = "InvalidAppRole"
	InvalidPlan                   Code = "InvalidPlan"
	InvalidSubscription           Code = "InvalidSubscription"
	InvalidOrganisationConfigs    Code = "InvalidOrganisationConfigs"
	InvalidPpPRelation            Code = "InvalidPpPRelation"
	InvalidPrePolicy              Code = "InvalidPrePolicy"
	InvalidPhoneNumber            Code = "InvalidPhoneNumber"
	InvalidContactPerson          Code = "InvalidContactPerson"
	InvalidCountry                Code = "InvalidCountry"
	DuplicatedEmailAddress        Code = "DuplicatedEmailAddress"
	DuplicatedMember              Code = "DuplicatedMember"
	EmptyMemberName               Code = "EmptyMemberName"
	TheEmailAddressAlreadyExists  Code = "TheEmailAddressAlreadyExists"
	NotMatchedWithEmail           Code = "NotMatchedWithEmail"
	MaxMemberLimitError           Code = "MaxMemberLimitError"
	DataValidationError           Code = "DataValidationError"
	FailedToCreateUser            Code = "FailedToCreateUser"
	FailedToCreateSubOrder        Code = "FailedToCreateSubscriptionOrder"
	FailedToCreateOrganizationApp Code = "FailedToCreateOrganizationApp"
	FailedToAddUserToFreePlan     Code = "FailedToAddUserToFreePlan"
	FailedToAddUserToAdmin        Code = "FailedToAddUserToAdmin"
	FailedToAddSubscription       Code = "FailedToAddSubscription"
	FailedToCreateUserTags        Code = "FailedToCreateUserTags"
	FailedToExecuteCallback       Code = "FailedToExecuteCallback"
	FailedToSyncOrg               Code = "FailedToSyncOrg"
	FailedToGetCompany            Code = "FailedToGetCompany"
	FailedToSyncOrgApp            Code = "FailedToSyncOrgApp"
	NotTheCreator                 Code = "NotTheCreator"
	FailedToConvertPolicy         Code = "FailedToConvertPolicy"
	FailedToSyncPolicy            Code = "FailedToSyncPolicy"
	FailedToUpsertOrg             Code = "FailedToUpsertOrg"
	FailedToSyncAc                Code = "FailedToSyncAc"
	FailedToAddedDefaultPolicy    Code = "FailedToAddedDefaultPolicy"
	FailedToUpsertAcGroups        Code = "FailedToUpsertAcGroups"
	FailedToSyncSubscriptions     Code = "FailedToSyncSubscriptions"
	EmailAlreadyExists            Code = "EmailAlreadyExists"
	MobileAlreadyExists           Code = "MobileAlreadyExists"
	InternalError                 Code = "InternalError"
	OrgAlreadyExists              Code = "OrgAlreadyExists"
	NotBelongThisOrg              Code = "NotBelongThisOrg"
	FailedToTransferCreator       Code = "FailedToTransferCreator"
	FailedToRemoveOrgMember       Code = "FailedToRemoveOrgMember"
	FailedToGetAcGroup            Code = "FailedToGetAcGroup"
)

type ErrorResponse

type ErrorResponse struct {
	// Type A URI reference that identifies the error type.
	//
	// example: https://example.net/validation-error
	Type string `json:"type,omitempty"`

	// Code represents the error code.
	//
	// example: Success or BadRequest
	Code Code `json:"code"`

	// Message is the error message.
	//
	// example: The requested resource could not be found
	Message string `json:"msg,omitempty"`

	// Detail contains further information on the nature of the error.
	//
	// example: Member with ID 12345 does not exist
	Detail string `json:"detail,omitempty"`

	// TraceId is the identifier for a trace. It is globally unique.
	//
	// example: 463ac35c9f6413ad48485a3953bb6124
	TraceId string `json:"traceId,omitempty"`
}

Generic Error Response

Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred.

swagger:model jsonErrorResponse

type OrganizatoinMember

type OrganizatoinMember struct {
	// Name is name of the member.
	//
	// required: true
	Name string `json:"name"`

	// Mail is email of the member.
	//
	// required: true
	// swagger:strfmt email
	Mail string `json:"mail"`
}

The request payload which is information about the members of an organization.

swagger:model organizatoinMember

Jump to

Keyboard shortcuts

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