Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorCodeResponse = map[ApiErrorCode]ApiErrorStruct{ NoYigFsErr: { AwsErrorCode: "NoYigFsErr", Description: "ok.", RespErrCode: 0, }, ErrYIgFsInternalErr: { AwsErrorCode: "ErrYIgFsInternalErr", Description: "We encountered an internal error, please try again.", RespErrCode: 40000, }, ErrYigFsRequestHeaderInvalid: { AwsErrorCode: "ErrYigFsRequestHeaderInvalid", Description: "The request header is invalid.", RespErrCode: 40001, }, ErrYigFsNoSuchFile: { AwsErrorCode: "ErrYigFsNoSuchFile", Description: "The specified file does not exist.", RespErrCode: 40002, }, ErrYigFsNotFindTargetDirFiles: { AwsErrorCode: "ErrYigFsNotFindTargetDirFiles", Description: "Not find files in the target dir, please check parameters and offset.", RespErrCode: 40003, }, ErrYigFsMissingRequiredParams: { AwsErrorCode: "ErrYigFsMissingRequiredParams", Description: "Missing some required params.", RespErrCode: 40004, }, ErrYigFsMissingBucketname: { AwsErrorCode: "ErrYigFsMissingBucketname", Description: "Missing necessary parameter bucketname.", RespErrCode: 40005, }, ErrYigFsInvalidFileType: { AwsErrorCode: "ErrYigFsInvalidFileType", Description: "The file type is invalid, please check it.", RespErrCode: 40006, }, ErrYigFsInvalidFlag: { AwsErrorCode: "ErrYigFsInvalidFlag", Description: "The get leader flag is invalid, please check it.", RespErrCode: 40007, }, ErrYigFsNoSuchLeader: { AwsErrorCode: "ErrYigFsNoSuchLeader", Description: "The specified leader does not exist.", RespErrCode: 40008, }, ErrYigFsNoSuchMachine: { AwsErrorCode: "ErrYigFsNoSuchMachine", Description: "The specified machine does not exist.", RespErrCode: 40009, }, ErrYigFsNoTargetSegment: { AwsErrorCode: "ErrYigFsNoTargetSegment", Description: "The target segment does not exist.", RespErrCode: 40010, }, ErrYigFsFileAlreadyExist: { AwsErrorCode: "ErrYigFsFileAlreadyExist", Description: "The file already existed.", RespErrCode: 40011, }, ErrYigFsMachineNotMatchSegLeader: { AwsErrorCode: "ErrYigFsMachineNotMatchSegLeader", Description: "The request machine does not match segment leader.", RespErrCode: 40012, }, ErrYigFsMissingSegmentLeader: { AwsErrorCode: "ErrYigFsMissingSegmentLeader", Description: "Missing necessary parameter segment leader.", RespErrCode: 40013, }, ErrYigFsNoVaildSegments: { AwsErrorCode: "ErrYigFsNoVaildSegments", Description: "No vaild segments to upload.", RespErrCode: 40014, }, ErrYigFsMachineNotMatchFileLeader: { AwsErrorCode: "ErrYigFsMachineNotMatchFileLeader", Description: "The request machine does not match file leader.", RespErrCode: 40015, }, ErrYigFsLeaderStatusIsInvalid: { AwsErrorCode: "ErrYigFsLeaderStatusIsInvalid", Description: "The leader's status is not up.", RespErrCode: 40016, }, ErrYigFsFailedCreateMessageProducer: { AwsErrorCode: "ErrYigFsFailedCreateMessageProducer", Description: "Failed to get message producer.", RespErrCode: 40017, }, ErrYigFsFailedCreateMessageConsumer: { AwsErrorCode: "ErrYigFsFailedCreateMessageConsumer", Description: "Failed to get message consumer.", RespErrCode: 40018, }, ErrYigFsFailedToSendMessage: { AwsErrorCode: "ErrYigFsFailedToSendMessage", Description: "Failed to send message to kafka.", RespErrCode: 40019, }, ErrYigFsTheFileAlreadyRenamed: { AwsErrorCode: "ErrYigFsTheFileAlreadyRenamed", Description: "The file already renamed.", RespErrCode: 40020, }, ErrYigFsNotFindTasks: { AwsErrorCode: "ErrYigFsNotFindTasks", Description: "Not found tasks for the job.", RespErrCode: 40021, }, ErrYigFsKafkaError: { AwsErrorCode: "ErrYigFsKafkaError", Description: "Kafka status is error.", RespErrCode: 40022, }, ErrYigFsNoSuchDir: { AwsErrorCode: "ErrYigFsNoSuchDir", Description: "The dir does not existed.", RespErrCode: 40023, }, ErrYigFsDeleteDirHasFiles: { AwsErrorCode: "ErrYigFsDeleteDirHasFiles", Description: "The dir has files, does not allowed to be deleted.", RespErrCode: 40024, }, ErrYigFsMachineNotMatchDirLeader: { AwsErrorCode: "ErrYigFsMachineNotMatchDirLeader", Description: "The request machine does not match dir leader.", RespErrCode: 40025, }, ErrYigFsInvalidUnitSizeOrCapacity: { AwsErrorCode: "ErrYigFsInvalidUnitSizeOrCapacity", Description: "The request unitSize and capacity should be > 0.", RespErrCode: 40026, }, ErrYigFsInvalidS3GetObjectSize: { AwsErrorCode: "ErrYigFsInvalidS3GetObjectSize", Description: "The request size is not equal s3 get object size", RespErrCode: 40027, }, ErrYigFsNoTargetFsId: { AwsErrorCode: "ErrYigFsNoTargetFsId", Description: "The request fsid does not existed.", RespErrCode: 40028, }, ErrYigFsNotSupportFsType: { AwsErrorCode: "ErrYigFsNotSupportFsType", Description: "The fs type is not support.", RespErrCode: 40029, }, ErrIntervalTreeNodeNotExists: { AwsErrorCode: "ErrIntervalTreeNodeNotExists", Description: "Node dose not exists in interval tree.", RespErrCode: 40030, }, ErrYigFsInvalidDir: { AwsErrorCode: "ErrYigFsInvalidDir", Description: "The request dir does not a valid dir, and connot be deleted.", RespErrCode: 40031, }, ErrYigFsInvalidS3Process: { AwsErrorCode: "ErrYigFsInvalidS3Process", Description: "The s3 process is invalid.", RespErrCode: 40032, }, ErrYigFsAuthInfoInvalid: { AwsErrorCode: "ErrYigFsAuthInfoInvalid", Description: "The auth info is invalid and can not be read.", RespErrCode: 40033, }, ErrYigFsRequestTimeTooSkewed: { AwsErrorCode: "ErrYigFsRequestTimeTooSkewed", Description: "The difference between the request time and the server's time is too large.", RespErrCode: 40034, }, ErrYigFsInvalidAccessToken: { AwsErrorCode: "ErrYigFsInvalidAccessToken", Description: "The access token is invalid.", RespErrCode: 40035, }, ErrYigFsInvalidRefreshToken: { AwsErrorCode: "ErrYigFsInvalidRefreshToken", Description: "The refresh token is invalid.", RespErrCode: 40036, }, ErrYigFsUserAuthFailed: { AwsErrorCode: "ErrYigFsUserAuthFailed", Description: "Failed to validate user auth.", RespErrCode: 40037, }, ErrYigFsInvalidInstance: { AwsErrorCode: "ErrYigFsInvalidInstance", Description: "The client instance is invalid.", RespErrCode: 40038, }, ErrYigFsInvalidAutumnParams: { AwsErrorCode: "ErrYigFsInvalidAutumnParams", Description: "The autumn params is invalid.", RespErrCode: 40039, }, ErrYigFsInvalidAutumnRegion: { AwsErrorCode: "ErrYigFsInvalidAutumnRegion", Description: "The autumn region is invalid.", RespErrCode: 40040, }, ErrYigFsNotEnableAutumn: { AwsErrorCode: "ErrYigFsNotEnableAutumn", Description: "The autumn does not enable.", RespErrCode: 40041, }, ErrYigFsInvalidAutumnProcess: { AwsErrorCode: "ErrYigFsInvalidAutumnProcess", Description: "The autumn process is invalid.", RespErrCode: 40042, }, ErrYigFsInvalidAutumnGetValueSize: { AwsErrorCode: "ErrYigFsInvalidAutumnGetValueSize", Description: "The value size get from autumn is invalid.", RespErrCode: 40043, }, ErrYigFsParamsLengthExceedsLimit: { AwsErrorCode: "ErrYigFsParamsLengthExceedsLimit", Description: "The length of some string parameters in the request exceeds 255 bytes.", RespErrCode: 40044, }, ErrYigFsEncounterRpcError: { AwsErrorCode: "ErrYigFsEncounterRpcError", Description: "An error occurred during the process of rpc.", RespErrCode: 40045, }, ErrYigFsFileHasNoSegmentForOffset: { AwsErrorCode: "ErrYigFsFileHasNoSegmentForOffset", Description: "The file does not have any segment for specific offset.", RespErrCode: 40046, }, ErrYigFsInvalidUGOPermission: { AwsErrorCode: "ErrYigFsInvalidUGOPermission", Description: "The ugo permission in request is invalid.", RespErrCode: 40047, }, ErrYigFsFsNameIsNotUnique: { AwsErrorCode: "ErrYigFsFsNameIsNotUnique", Description: "The fsname is not unique.", RespErrCode: 40048, }, ErrYigFsNoFsForUid: { AwsErrorCode: "ErrYigFsNoFsForUid", Description: "There is no fs for uid.", RespErrCode: 40049, }, ErrYigFsFsIsNotRunning: { AwsErrorCode: "ErrYigFsFsIsNotRunning", Description: "The fs is not running.", RespErrCode: 40050, }, ErrYigFsInvalidFsStatus: { AwsErrorCode: "ErrYigFsInvalidFsStatus", Description: "The status of fs is invalid.", RespErrCode: 40051, }, ErrYigFsFileSystemIsNeverMounted: { AwsErrorCode: "ErrYigFsFileSystemIsNeverMounted", Description: "The file system is never mounted, delete it from gc_fs.", RespErrCode: 40052, }, ErrYigFsNoFileBlockForGcFile: { AwsErrorCode: "ErrYigFsNoFileBlockForGcFile", Description: "The gc file does not have file block and can be directly deleted.", RespErrCode: 40053, }, ErrYigFsNoFileBlockForGcFs: { AwsErrorCode: "ErrYigFsNoFileBlockForGcFs", Description: "The gc fs does not have file block and can be directly deleted.", RespErrCode: 40054, }, ErrSignatureVerifyFailed: { AwsErrorCode: "ErrSignatureVerifyFailed", Description: "Failed to verify signature.", RespErrCode: 40055, }, ErrAuthServiceInternalError: { AwsErrorCode: "ErrAuthServiceInternalError", Description: "There is an internal error in authservice.", RespErrCode: 40056, }, ErrFsSecretNumExceedLimit: { AwsErrorCode: "ErrFsSecretNumExceedLimit", Description: "The number of fs secret exceeds limit.", RespErrCode: 40057, }, ErrNoFsSecretForFsId: { AwsErrorCode: "ErrNoFsSecretForFsId", Description: "There is no fs secret for fsid.", RespErrCode: 40058, }, ErrFsSecretHasBeenDownloaded: { AwsErrorCode: "ErrFsSecretHasBeenDownloaded", Description: "The fs secret can only be downloaded once.", RespErrCode: 40059, }, ErrFsIdNotExisted: { AwsErrorCode: "ErrFsIdNotExisted", Description: "The fsid does not exist.", RespErrCode: 40060, }, }
Functions ¶
func GetErrInfo ¶
func GetFsErrInfo ¶
func GetRefreshErrInfo ¶
func GetRefreshErrInfo(err error) (retErr *pb.RefreshError)
Types ¶
type ApiErrorCode ¶
type ApiErrorCode int
APIErrorCode type of error status.
const ( NoYigFsErr ApiErrorCode = iota ErrYIgFsInternalErr ErrYigFsRequestHeaderInvalid ErrYigFsNoSuchFile ErrYigFsNotFindTargetDirFiles ErrYigFsMissingRequiredParams ErrYigFsMissingBucketname ErrYigFsInvalidFileType ErrYigFsInvalidFlag ErrYigFsNoSuchLeader ErrYigFsNoSuchMachine ErrYigFsNoTargetSegment ErrYigFsFileAlreadyExist ErrYigFsMachineNotMatchSegLeader ErrYigFsMissingSegmentLeader ErrYigFsNoVaildSegments ErrYigFsMachineNotMatchFileLeader ErrYigFsLeaderStatusIsInvalid ErrYigFsFailedCreateMessageProducer ErrYigFsFailedCreateMessageConsumer ErrYigFsFailedToSendMessage ErrYigFsTheFileAlreadyRenamed ErrYigFsNotFindTasks ErrYigFsKafkaError ErrYigFsNoSuchDir ErrYigFsDeleteDirHasFiles ErrYigFsMachineNotMatchDirLeader ErrYigFsInvalidUnitSizeOrCapacity ErrYigFsInvalidS3GetObjectSize ErrYigFsNoTargetFsId ErrYigFsNotSupportFsType ErrIntervalTreeNodeNotExists ErrYigFsInvalidDir ErrYigFsInvalidS3Process ErrYigFsAuthInfoInvalid ErrYigFsRequestTimeTooSkewed ErrYigFsInvalidAccessToken ErrYigFsInvalidRefreshToken ErrYigFsUserAuthFailed ErrYigFsInvalidInstance ErrYigFsInvalidAutumnParams ErrYigFsInvalidAutumnRegion ErrYigFsNotEnableAutumn ErrYigFsInvalidAutumnProcess ErrYigFsInvalidAutumnGetValueSize ErrYigFsParamsLengthExceedsLimit ErrYigFsEncounterRpcError ErrYigFsFileHasNoSegmentForOffset ErrYigFsInvalidUGOPermission ErrYigFsFsNameIsNotUnique ErrYigFsNoFsForUid ErrYigFsFsIsNotRunning ErrYigFsInvalidFsStatus ErrYigFsFileSystemIsNeverMounted ErrYigFsNoFileBlockForGcFile ErrYigFsNoFileBlockForGcFs ErrSignatureVerifyFailed ErrAuthServiceInternalError ErrFsSecretNumExceedLimit ErrNoFsSecretForFsId ErrFsSecretHasBeenDownloaded ErrFsIdNotExisted )
Error codes, non exhaustive list
func (ApiErrorCode) AwsErrorCode ¶
func (e ApiErrorCode) AwsErrorCode() string
func (ApiErrorCode) Description ¶
func (e ApiErrorCode) Description() string
func (ApiErrorCode) Error ¶
func (e ApiErrorCode) Error() string
func (ApiErrorCode) RespErrCode ¶
func (e ApiErrorCode) RespErrCode() int
type ApiErrorStruct ¶
Click to show internal directories.
Click to hide internal directories.