// Code generated by thriftgo (0.2.1). DO NOT EDIT. package core import ( "context" "fmt" "github.com/apache/thrift/lib/go/thrift" "github.com/cloudwego/thriftgo/generator/golang/extension/meta" "github.com/cloudwego/thriftgo/generator/golang/extension/unknown" "wpw-common/pkg/gen/biz/core/exceptions" "wpw-common/pkg/gen/biz/core/structs" ) type CoreService interface { // oneway void asd() Login(ctx context.Context, request *structs.LoginRequest) (r *structs.LoginResponse, err error) //@authenticated GetProfile(ctx context.Context, request *structs.GetProfileRequest) (r *structs.GetProfileResponse, err error) //@authenticated Logout(ctx context.Context, request *structs.LogoutRequest) (r *structs.LogoutResponse, err error) //@authenticated //@role(Admin) // Get list of users registered in system GetUserList(ctx context.Context, request *structs.GetUserListRequest) (r *structs.GetUserListResponse, err error) //@authenticated //@role(Admin) CreateUser(ctx context.Context, request *structs.CreateUserRequest) (r *structs.CreateUserResponse, err error) //@authenticated //@role(Admin) DeleteUsers(ctx context.Context, request *structs.DeleteUsersRequest) (r *structs.DeleteUsersResponse, err error) //@authenticated //@role(All) // Get list of accessible WajibPajak by OWNED|ROLE GetWajibPajakList(ctx context.Context, request *structs.GetWajibPajakListRequest) (r *structs.GetWajibPajakListResponse, err error) //@authenticated //@role(All) // Create WajibPajak CreateWajibPajak(ctx context.Context, request *structs.CreateWajibPajakRequest) (r *structs.CreateWajibPajakResponse, err error) //@authenticated //@role(All) DeleteWajibPajakList(ctx context.Context, request *structs.DeleteWajibpajakListRequest) (r *structs.DeleteWajibpajakListResponse, err error) } type CoreServiceClient struct { c thrift.TClient } func NewCoreServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *CoreServiceClient { return &CoreServiceClient{ c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), } } func NewCoreServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *CoreServiceClient { return &CoreServiceClient{ c: thrift.NewTStandardClient(iprot, oprot), } } func NewCoreServiceClient(c thrift.TClient) *CoreServiceClient { return &CoreServiceClient{ c: c, } } func (p *CoreServiceClient) Client_() thrift.TClient { return p.c } func (p *CoreServiceClient) Login(ctx context.Context, request *structs.LoginRequest) (r *structs.LoginResponse, err error) { var _args CoreServiceLoginArgs _args.Request = request var _result CoreServiceLoginResult if _, err = p.Client_().Call(ctx, "login", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) GetProfile(ctx context.Context, request *structs.GetProfileRequest) (r *structs.GetProfileResponse, err error) { var _args CoreServiceGetProfileArgs _args.Request = request var _result CoreServiceGetProfileResult if _, err = p.Client_().Call(ctx, "getProfile", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) Logout(ctx context.Context, request *structs.LogoutRequest) (r *structs.LogoutResponse, err error) { var _args CoreServiceLogoutArgs _args.Request = request var _result CoreServiceLogoutResult if _, err = p.Client_().Call(ctx, "logout", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) GetUserList(ctx context.Context, request *structs.GetUserListRequest) (r *structs.GetUserListResponse, err error) { var _args CoreServiceGetUserListArgs _args.Request = request var _result CoreServiceGetUserListResult if _, err = p.Client_().Call(ctx, "getUserList", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) CreateUser(ctx context.Context, request *structs.CreateUserRequest) (r *structs.CreateUserResponse, err error) { var _args CoreServiceCreateUserArgs _args.Request = request var _result CoreServiceCreateUserResult if _, err = p.Client_().Call(ctx, "createUser", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) DeleteUsers(ctx context.Context, request *structs.DeleteUsersRequest) (r *structs.DeleteUsersResponse, err error) { var _args CoreServiceDeleteUsersArgs _args.Request = request var _result CoreServiceDeleteUsersResult if _, err = p.Client_().Call(ctx, "deleteUsers", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) GetWajibPajakList(ctx context.Context, request *structs.GetWajibPajakListRequest) (r *structs.GetWajibPajakListResponse, err error) { var _args CoreServiceGetWajibPajakListArgs _args.Request = request var _result CoreServiceGetWajibPajakListResult if _, err = p.Client_().Call(ctx, "getWajibPajakList", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) CreateWajibPajak(ctx context.Context, request *structs.CreateWajibPajakRequest) (r *structs.CreateWajibPajakResponse, err error) { var _args CoreServiceCreateWajibPajakArgs _args.Request = request var _result CoreServiceCreateWajibPajakResult if _, err = p.Client_().Call(ctx, "createWajibPajak", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } func (p *CoreServiceClient) DeleteWajibPajakList(ctx context.Context, request *structs.DeleteWajibpajakListRequest) (r *structs.DeleteWajibpajakListResponse, err error) { var _args CoreServiceDeleteWajibPajakListArgs _args.Request = request var _result CoreServiceDeleteWajibPajakListResult if _, err = p.Client_().Call(ctx, "deleteWajibPajakList", &_args, &_result); err != nil { return } switch { case _result.E != nil: return r, _result.E } return _result.GetSuccess(), nil } type CoreServiceProcessor struct { processorMap map[string]thrift.TProcessorFunction handler CoreService } func (p *CoreServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { p.processorMap[key] = processor } func (p *CoreServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { processor, ok = p.processorMap[key] return processor, ok } func (p *CoreServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { return p.processorMap } func NewCoreServiceProcessor(handler CoreService) *CoreServiceProcessor { self := &CoreServiceProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)} self.AddToProcessorMap("login", &coreServiceProcessorLogin{handler: handler}) self.AddToProcessorMap("getProfile", &coreServiceProcessorGetProfile{handler: handler}) self.AddToProcessorMap("logout", &coreServiceProcessorLogout{handler: handler}) self.AddToProcessorMap("getUserList", &coreServiceProcessorGetUserList{handler: handler}) self.AddToProcessorMap("createUser", &coreServiceProcessorCreateUser{handler: handler}) self.AddToProcessorMap("deleteUsers", &coreServiceProcessorDeleteUsers{handler: handler}) self.AddToProcessorMap("getWajibPajakList", &coreServiceProcessorGetWajibPajakList{handler: handler}) self.AddToProcessorMap("createWajibPajak", &coreServiceProcessorCreateWajibPajak{handler: handler}) self.AddToProcessorMap("deleteWajibPajakList", &coreServiceProcessorDeleteWajibPajakList{handler: handler}) return self } func (p *CoreServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) if err2 != nil { return false, thrift.WrapTException(err2) } if processor, ok := p.GetProcessorFunction(name); ok { return processor.Process(ctx, seqId, iprot, oprot) } iprot.Skip(ctx, thrift.STRUCT) iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name) oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, x } type coreServiceProcessorLogin struct { handler CoreService } func (p *coreServiceProcessorLogin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceLoginArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "login", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceLoginResult{} var retval *structs.LoginResponse if retval, err2 = p.handler.Login(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing login: "+err2.Error()) oprot.WriteMessageBegin(ctx, "login", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "login", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response login: "+err2.Error()) oprot.WriteMessageBegin(ctx, "login", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorGetProfile struct { handler CoreService } func (p *coreServiceProcessorGetProfile) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceGetProfileArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "getProfile", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceGetProfileResult{} var retval *structs.GetProfileResponse if retval, err2 = p.handler.GetProfile(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getProfile: "+err2.Error()) oprot.WriteMessageBegin(ctx, "getProfile", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "getProfile", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response getProfile: "+err2.Error()) oprot.WriteMessageBegin(ctx, "getProfile", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorLogout struct { handler CoreService } func (p *coreServiceProcessorLogout) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceLogoutArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "logout", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceLogoutResult{} var retval *structs.LogoutResponse if retval, err2 = p.handler.Logout(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing logout: "+err2.Error()) oprot.WriteMessageBegin(ctx, "logout", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "logout", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response logout: "+err2.Error()) oprot.WriteMessageBegin(ctx, "logout", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorGetUserList struct { handler CoreService } func (p *coreServiceProcessorGetUserList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceGetUserListArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "getUserList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceGetUserListResult{} var retval *structs.GetUserListResponse if retval, err2 = p.handler.GetUserList(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getUserList: "+err2.Error()) oprot.WriteMessageBegin(ctx, "getUserList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "getUserList", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response getUserList: "+err2.Error()) oprot.WriteMessageBegin(ctx, "getUserList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorCreateUser struct { handler CoreService } func (p *coreServiceProcessorCreateUser) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceCreateUserArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "createUser", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceCreateUserResult{} var retval *structs.CreateUserResponse if retval, err2 = p.handler.CreateUser(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createUser: "+err2.Error()) oprot.WriteMessageBegin(ctx, "createUser", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "createUser", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response createUser: "+err2.Error()) oprot.WriteMessageBegin(ctx, "createUser", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorDeleteUsers struct { handler CoreService } func (p *coreServiceProcessorDeleteUsers) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceDeleteUsersArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "deleteUsers", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceDeleteUsersResult{} var retval *structs.DeleteUsersResponse if retval, err2 = p.handler.DeleteUsers(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteUsers: "+err2.Error()) oprot.WriteMessageBegin(ctx, "deleteUsers", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "deleteUsers", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response deleteUsers: "+err2.Error()) oprot.WriteMessageBegin(ctx, "deleteUsers", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorGetWajibPajakList struct { handler CoreService } func (p *coreServiceProcessorGetWajibPajakList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceGetWajibPajakListArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "getWajibPajakList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceGetWajibPajakListResult{} var retval *structs.GetWajibPajakListResponse if retval, err2 = p.handler.GetWajibPajakList(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getWajibPajakList: "+err2.Error()) oprot.WriteMessageBegin(ctx, "getWajibPajakList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "getWajibPajakList", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response getWajibPajakList: "+err2.Error()) oprot.WriteMessageBegin(ctx, "getWajibPajakList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorCreateWajibPajak struct { handler CoreService } func (p *coreServiceProcessorCreateWajibPajak) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceCreateWajibPajakArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "createWajibPajak", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceCreateWajibPajakResult{} var retval *structs.CreateWajibPajakResponse if retval, err2 = p.handler.CreateWajibPajak(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createWajibPajak: "+err2.Error()) oprot.WriteMessageBegin(ctx, "createWajibPajak", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "createWajibPajak", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response createWajibPajak: "+err2.Error()) oprot.WriteMessageBegin(ctx, "createWajibPajak", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type coreServiceProcessorDeleteWajibPajakList struct { handler CoreService } func (p *coreServiceProcessorDeleteWajibPajakList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { args := CoreServiceDeleteWajibPajakListArgs{} var err2 error if err2 = args.Read(ctx, iprot); err2 != nil { iprot.ReadMessageEnd(ctx) x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) oprot.WriteMessageBegin(ctx, "deleteWajibPajakList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return false, thrift.WrapTException(err2) } iprot.ReadMessageEnd(ctx) result := CoreServiceDeleteWajibPajakListResult{} var retval *structs.DeleteWajibpajakListResponse if retval, err2 = p.handler.DeleteWajibPajakList(ctx, args.Request); err2 != nil { switch v := err2.(type) { case *exceptions.CoreServicesException: result.E = v default: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteWajibPajakList: "+err2.Error()) oprot.WriteMessageBegin(ctx, "deleteWajibPajakList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) return true, thrift.WrapTException(err2) } } else { result.Success = retval } if err2 = oprot.WriteMessageBegin(ctx, "deleteWajibPajakList", thrift.REPLY, seqId); err2 != nil { goto reply_err } if err2 = result.Write(ctx, oprot); err == nil && err2 != nil { goto reply_err } if err2 = oprot.WriteMessageEnd(ctx); err == nil && err2 != nil { goto reply_err } if err2 = oprot.Flush(ctx); err == nil && err2 != nil { goto reply_err } if err != nil { return } return true, err reply_err: x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error on response deleteWajibPajakList: "+err2.Error()) oprot.WriteMessageBegin(ctx, "deleteWajibPajakList", thrift.EXCEPTION, seqId) x.Write(ctx, oprot) oprot.WriteMessageEnd(ctx) oprot.Flush(ctx) err = thrift.WrapTException(err2) return } type CoreServiceLoginArgs struct { Request *structs.LoginRequest `thrift:"request,1" frugal:"1,default,structs.LoginRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceLoginArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xa, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceLoginArgs() *CoreServiceLoginArgs { return &CoreServiceLoginArgs{} } func (p *CoreServiceLoginArgs) InitDefault() { *p = CoreServiceLoginArgs{} } var CoreServiceLoginArgs_Request_DEFAULT *structs.LoginRequest func (p *CoreServiceLoginArgs) GetRequest() (v *structs.LoginRequest) { if !p.IsSetRequest() { return CoreServiceLoginArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceLoginArgs) SetRequest(val *structs.LoginRequest) { p.Request = val } func (p *CoreServiceLoginArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceLoginArgs = map[int16]string{ 1: "request", } func (p *CoreServiceLoginArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceLoginArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceLoginArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceLoginArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewLoginRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceLoginArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "login_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceLoginArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceLoginArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceLoginArgs(%+v)", *p) } type CoreServiceLoginResult struct { Success *structs.LoginResponse `thrift:"success,0,optional" frugal:"0,optional,structs.LoginResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceLoginResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceLoginResult() *CoreServiceLoginResult { return &CoreServiceLoginResult{} } func (p *CoreServiceLoginResult) InitDefault() { *p = CoreServiceLoginResult{} } var CoreServiceLoginResult_Success_DEFAULT *structs.LoginResponse func (p *CoreServiceLoginResult) GetSuccess() (v *structs.LoginResponse) { if !p.IsSetSuccess() { return CoreServiceLoginResult_Success_DEFAULT } return p.Success } var CoreServiceLoginResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceLoginResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceLoginResult_E_DEFAULT } return p.E } func (p *CoreServiceLoginResult) SetSuccess(x interface{}) { p.Success = x.(*structs.LoginResponse) } func (p *CoreServiceLoginResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceLoginResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceLoginResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceLoginResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceLoginResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceLoginResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceLoginResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceLoginResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewLoginResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceLoginResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceLoginResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "login_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceLoginResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceLoginResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceLoginResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceLoginResult(%+v)", *p) } type CoreServiceGetProfileArgs struct { Request *structs.GetProfileRequest `thrift:"request,1" frugal:"1,default,structs.GetProfileRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceGetProfileArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceGetProfileArgs() *CoreServiceGetProfileArgs { return &CoreServiceGetProfileArgs{} } func (p *CoreServiceGetProfileArgs) InitDefault() { *p = CoreServiceGetProfileArgs{} } var CoreServiceGetProfileArgs_Request_DEFAULT *structs.GetProfileRequest func (p *CoreServiceGetProfileArgs) GetRequest() (v *structs.GetProfileRequest) { if !p.IsSetRequest() { return CoreServiceGetProfileArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceGetProfileArgs) SetRequest(val *structs.GetProfileRequest) { p.Request = val } func (p *CoreServiceGetProfileArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceGetProfileArgs = map[int16]string{ 1: "request", } func (p *CoreServiceGetProfileArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceGetProfileArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceGetProfileArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceGetProfileArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewGetProfileRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetProfileArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "getProfile_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceGetProfileArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceGetProfileArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceGetProfileArgs(%+v)", *p) } type CoreServiceGetProfileResult struct { Success *structs.GetProfileResponse `thrift:"success,0,optional" frugal:"0,optional,structs.GetProfileResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceGetProfileResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x11, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceGetProfileResult() *CoreServiceGetProfileResult { return &CoreServiceGetProfileResult{} } func (p *CoreServiceGetProfileResult) InitDefault() { *p = CoreServiceGetProfileResult{} } var CoreServiceGetProfileResult_Success_DEFAULT *structs.GetProfileResponse func (p *CoreServiceGetProfileResult) GetSuccess() (v *structs.GetProfileResponse) { if !p.IsSetSuccess() { return CoreServiceGetProfileResult_Success_DEFAULT } return p.Success } var CoreServiceGetProfileResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceGetProfileResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceGetProfileResult_E_DEFAULT } return p.E } func (p *CoreServiceGetProfileResult) SetSuccess(x interface{}) { p.Success = x.(*structs.GetProfileResponse) } func (p *CoreServiceGetProfileResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceGetProfileResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceGetProfileResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceGetProfileResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceGetProfileResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceGetProfileResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceGetProfileResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceGetProfileResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewGetProfileResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetProfileResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetProfileResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "getProfile_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceGetProfileResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceGetProfileResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceGetProfileResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceGetProfileResult(%+v)", *p) } type CoreServiceLogoutArgs struct { Request *structs.LogoutRequest `thrift:"request,1" frugal:"1,default,structs.LogoutRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceLogoutArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xb, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceLogoutArgs() *CoreServiceLogoutArgs { return &CoreServiceLogoutArgs{} } func (p *CoreServiceLogoutArgs) InitDefault() { *p = CoreServiceLogoutArgs{} } var CoreServiceLogoutArgs_Request_DEFAULT *structs.LogoutRequest func (p *CoreServiceLogoutArgs) GetRequest() (v *structs.LogoutRequest) { if !p.IsSetRequest() { return CoreServiceLogoutArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceLogoutArgs) SetRequest(val *structs.LogoutRequest) { p.Request = val } func (p *CoreServiceLogoutArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceLogoutArgs = map[int16]string{ 1: "request", } func (p *CoreServiceLogoutArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceLogoutArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceLogoutArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceLogoutArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewLogoutRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceLogoutArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "logout_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceLogoutArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceLogoutArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceLogoutArgs(%+v)", *p) } type CoreServiceLogoutResult struct { Success *structs.LogoutResponse `thrift:"success,0,optional" frugal:"0,optional,structs.LogoutResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceLogoutResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xd, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceLogoutResult() *CoreServiceLogoutResult { return &CoreServiceLogoutResult{} } func (p *CoreServiceLogoutResult) InitDefault() { *p = CoreServiceLogoutResult{} } var CoreServiceLogoutResult_Success_DEFAULT *structs.LogoutResponse func (p *CoreServiceLogoutResult) GetSuccess() (v *structs.LogoutResponse) { if !p.IsSetSuccess() { return CoreServiceLogoutResult_Success_DEFAULT } return p.Success } var CoreServiceLogoutResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceLogoutResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceLogoutResult_E_DEFAULT } return p.E } func (p *CoreServiceLogoutResult) SetSuccess(x interface{}) { p.Success = x.(*structs.LogoutResponse) } func (p *CoreServiceLogoutResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceLogoutResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceLogoutResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceLogoutResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceLogoutResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceLogoutResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceLogoutResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceLogoutResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewLogoutResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceLogoutResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceLogoutResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "logout_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceLogoutResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceLogoutResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceLogoutResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceLogoutResult(%+v)", *p) } type CoreServiceGetUserListArgs struct { Request *structs.GetUserListRequest `thrift:"request,1" frugal:"1,default,structs.GetUserListRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceGetUserListArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x10, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceGetUserListArgs() *CoreServiceGetUserListArgs { return &CoreServiceGetUserListArgs{} } func (p *CoreServiceGetUserListArgs) InitDefault() { *p = CoreServiceGetUserListArgs{} } var CoreServiceGetUserListArgs_Request_DEFAULT *structs.GetUserListRequest func (p *CoreServiceGetUserListArgs) GetRequest() (v *structs.GetUserListRequest) { if !p.IsSetRequest() { return CoreServiceGetUserListArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceGetUserListArgs) SetRequest(val *structs.GetUserListRequest) { p.Request = val } func (p *CoreServiceGetUserListArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceGetUserListArgs = map[int16]string{ 1: "request", } func (p *CoreServiceGetUserListArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceGetUserListArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceGetUserListArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceGetUserListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewGetUserListRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetUserListArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "getUserList_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceGetUserListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceGetUserListArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceGetUserListArgs(%+v)", *p) } type CoreServiceGetUserListResult struct { Success *structs.GetUserListResponse `thrift:"success,0,optional" frugal:"0,optional,structs.GetUserListResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceGetUserListResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x12, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceGetUserListResult() *CoreServiceGetUserListResult { return &CoreServiceGetUserListResult{} } func (p *CoreServiceGetUserListResult) InitDefault() { *p = CoreServiceGetUserListResult{} } var CoreServiceGetUserListResult_Success_DEFAULT *structs.GetUserListResponse func (p *CoreServiceGetUserListResult) GetSuccess() (v *structs.GetUserListResponse) { if !p.IsSetSuccess() { return CoreServiceGetUserListResult_Success_DEFAULT } return p.Success } var CoreServiceGetUserListResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceGetUserListResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceGetUserListResult_E_DEFAULT } return p.E } func (p *CoreServiceGetUserListResult) SetSuccess(x interface{}) { p.Success = x.(*structs.GetUserListResponse) } func (p *CoreServiceGetUserListResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceGetUserListResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceGetUserListResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceGetUserListResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceGetUserListResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceGetUserListResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceGetUserListResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceGetUserListResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewGetUserListResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetUserListResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetUserListResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "getUserList_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceGetUserListResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceGetUserListResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceGetUserListResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceGetUserListResult(%+v)", *p) } type CoreServiceCreateUserArgs struct { Request *structs.CreateUserRequest `thrift:"request,1" frugal:"1,default,structs.CreateUserRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceCreateUserArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0xf, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceCreateUserArgs() *CoreServiceCreateUserArgs { return &CoreServiceCreateUserArgs{} } func (p *CoreServiceCreateUserArgs) InitDefault() { *p = CoreServiceCreateUserArgs{} } var CoreServiceCreateUserArgs_Request_DEFAULT *structs.CreateUserRequest func (p *CoreServiceCreateUserArgs) GetRequest() (v *structs.CreateUserRequest) { if !p.IsSetRequest() { return CoreServiceCreateUserArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceCreateUserArgs) SetRequest(val *structs.CreateUserRequest) { p.Request = val } func (p *CoreServiceCreateUserArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceCreateUserArgs = map[int16]string{ 1: "request", } func (p *CoreServiceCreateUserArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceCreateUserArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceCreateUserArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceCreateUserArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewCreateUserRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceCreateUserArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "createUser_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceCreateUserArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceCreateUserArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceCreateUserArgs(%+v)", *p) } type CoreServiceCreateUserResult struct { Success *structs.CreateUserResponse `thrift:"success,0,optional" frugal:"0,optional,structs.CreateUserResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceCreateUserResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceCreateUserResult() *CoreServiceCreateUserResult { return &CoreServiceCreateUserResult{} } func (p *CoreServiceCreateUserResult) InitDefault() { *p = CoreServiceCreateUserResult{} } var CoreServiceCreateUserResult_Success_DEFAULT *structs.CreateUserResponse func (p *CoreServiceCreateUserResult) GetSuccess() (v *structs.CreateUserResponse) { if !p.IsSetSuccess() { return CoreServiceCreateUserResult_Success_DEFAULT } return p.Success } var CoreServiceCreateUserResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceCreateUserResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceCreateUserResult_E_DEFAULT } return p.E } func (p *CoreServiceCreateUserResult) SetSuccess(x interface{}) { p.Success = x.(*structs.CreateUserResponse) } func (p *CoreServiceCreateUserResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceCreateUserResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceCreateUserResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceCreateUserResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceCreateUserResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceCreateUserResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceCreateUserResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceCreateUserResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewCreateUserResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceCreateUserResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceCreateUserResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "createUser_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceCreateUserResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceCreateUserResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceCreateUserResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceCreateUserResult(%+v)", *p) } type CoreServiceDeleteUsersArgs struct { Request *structs.DeleteUsersRequest `thrift:"request,1" frugal:"1,default,structs.DeleteUsersRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceDeleteUsersArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceDeleteUsersArgs() *CoreServiceDeleteUsersArgs { return &CoreServiceDeleteUsersArgs{} } func (p *CoreServiceDeleteUsersArgs) InitDefault() { *p = CoreServiceDeleteUsersArgs{} } var CoreServiceDeleteUsersArgs_Request_DEFAULT *structs.DeleteUsersRequest func (p *CoreServiceDeleteUsersArgs) GetRequest() (v *structs.DeleteUsersRequest) { if !p.IsSetRequest() { return CoreServiceDeleteUsersArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceDeleteUsersArgs) SetRequest(val *structs.DeleteUsersRequest) { p.Request = val } func (p *CoreServiceDeleteUsersArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceDeleteUsersArgs = map[int16]string{ 1: "request", } func (p *CoreServiceDeleteUsersArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceDeleteUsersArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceDeleteUsersArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceDeleteUsersArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewDeleteUsersRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceDeleteUsersArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "deleteUsers_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceDeleteUsersArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceDeleteUsersArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceDeleteUsersArgs(%+v)", *p) } type CoreServiceDeleteUsersResult struct { Success *structs.DeleteUsersResponse `thrift:"success,0,optional" frugal:"0,optional,structs.DeleteUsersResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceDeleteUsersResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceDeleteUsersResult() *CoreServiceDeleteUsersResult { return &CoreServiceDeleteUsersResult{} } func (p *CoreServiceDeleteUsersResult) InitDefault() { *p = CoreServiceDeleteUsersResult{} } var CoreServiceDeleteUsersResult_Success_DEFAULT *structs.DeleteUsersResponse func (p *CoreServiceDeleteUsersResult) GetSuccess() (v *structs.DeleteUsersResponse) { if !p.IsSetSuccess() { return CoreServiceDeleteUsersResult_Success_DEFAULT } return p.Success } var CoreServiceDeleteUsersResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceDeleteUsersResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceDeleteUsersResult_E_DEFAULT } return p.E } func (p *CoreServiceDeleteUsersResult) SetSuccess(x interface{}) { p.Success = x.(*structs.DeleteUsersResponse) } func (p *CoreServiceDeleteUsersResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceDeleteUsersResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceDeleteUsersResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceDeleteUsersResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceDeleteUsersResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceDeleteUsersResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceDeleteUsersResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceDeleteUsersResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewDeleteUsersResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceDeleteUsersResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceDeleteUsersResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "deleteUsers_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceDeleteUsersResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceDeleteUsersResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceDeleteUsersResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceDeleteUsersResult(%+v)", *p) } type CoreServiceGetWajibPajakListArgs struct { Request *structs.GetWajibPajakListRequest `thrift:"request,1" frugal:"1,default,structs.GetWajibPajakListRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceGetWajibPajakListArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x16, 0x67, 0x65, 0x74, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceGetWajibPajakListArgs() *CoreServiceGetWajibPajakListArgs { return &CoreServiceGetWajibPajakListArgs{} } func (p *CoreServiceGetWajibPajakListArgs) InitDefault() { *p = CoreServiceGetWajibPajakListArgs{} } var CoreServiceGetWajibPajakListArgs_Request_DEFAULT *structs.GetWajibPajakListRequest func (p *CoreServiceGetWajibPajakListArgs) GetRequest() (v *structs.GetWajibPajakListRequest) { if !p.IsSetRequest() { return CoreServiceGetWajibPajakListArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceGetWajibPajakListArgs) SetRequest(val *structs.GetWajibPajakListRequest) { p.Request = val } func (p *CoreServiceGetWajibPajakListArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceGetWajibPajakListArgs = map[int16]string{ 1: "request", } func (p *CoreServiceGetWajibPajakListArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceGetWajibPajakListArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceGetWajibPajakListArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceGetWajibPajakListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewGetWajibPajakListRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetWajibPajakListArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "getWajibPajakList_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceGetWajibPajakListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceGetWajibPajakListArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceGetWajibPajakListArgs(%+v)", *p) } type CoreServiceGetWajibPajakListResult struct { Success *structs.GetWajibPajakListResponse `thrift:"success,0,optional" frugal:"0,optional,structs.GetWajibPajakListResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceGetWajibPajakListResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x18, 0x67, 0x65, 0x74, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceGetWajibPajakListResult() *CoreServiceGetWajibPajakListResult { return &CoreServiceGetWajibPajakListResult{} } func (p *CoreServiceGetWajibPajakListResult) InitDefault() { *p = CoreServiceGetWajibPajakListResult{} } var CoreServiceGetWajibPajakListResult_Success_DEFAULT *structs.GetWajibPajakListResponse func (p *CoreServiceGetWajibPajakListResult) GetSuccess() (v *structs.GetWajibPajakListResponse) { if !p.IsSetSuccess() { return CoreServiceGetWajibPajakListResult_Success_DEFAULT } return p.Success } var CoreServiceGetWajibPajakListResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceGetWajibPajakListResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceGetWajibPajakListResult_E_DEFAULT } return p.E } func (p *CoreServiceGetWajibPajakListResult) SetSuccess(x interface{}) { p.Success = x.(*structs.GetWajibPajakListResponse) } func (p *CoreServiceGetWajibPajakListResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceGetWajibPajakListResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceGetWajibPajakListResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceGetWajibPajakListResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceGetWajibPajakListResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceGetWajibPajakListResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceGetWajibPajakListResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceGetWajibPajakListResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewGetWajibPajakListResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetWajibPajakListResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceGetWajibPajakListResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "getWajibPajakList_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceGetWajibPajakListResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceGetWajibPajakListResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceGetWajibPajakListResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceGetWajibPajakListResult(%+v)", *p) } type CoreServiceCreateWajibPajakArgs struct { Request *structs.CreateWajibPajakRequest `thrift:"request,1" frugal:"1,default,structs.CreateWajibPajakRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceCreateWajibPajakArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceCreateWajibPajakArgs() *CoreServiceCreateWajibPajakArgs { return &CoreServiceCreateWajibPajakArgs{} } func (p *CoreServiceCreateWajibPajakArgs) InitDefault() { *p = CoreServiceCreateWajibPajakArgs{} } var CoreServiceCreateWajibPajakArgs_Request_DEFAULT *structs.CreateWajibPajakRequest func (p *CoreServiceCreateWajibPajakArgs) GetRequest() (v *structs.CreateWajibPajakRequest) { if !p.IsSetRequest() { return CoreServiceCreateWajibPajakArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceCreateWajibPajakArgs) SetRequest(val *structs.CreateWajibPajakRequest) { p.Request = val } func (p *CoreServiceCreateWajibPajakArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceCreateWajibPajakArgs = map[int16]string{ 1: "request", } func (p *CoreServiceCreateWajibPajakArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceCreateWajibPajakArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceCreateWajibPajakArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceCreateWajibPajakArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewCreateWajibPajakRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceCreateWajibPajakArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "createWajibPajak_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceCreateWajibPajakArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceCreateWajibPajakArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceCreateWajibPajakArgs(%+v)", *p) } type CoreServiceCreateWajibPajakResult struct { Success *structs.CreateWajibPajakResponse `thrift:"success,0,optional" frugal:"0,optional,structs.CreateWajibPajakResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceCreateWajibPajakResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceCreateWajibPajakResult() *CoreServiceCreateWajibPajakResult { return &CoreServiceCreateWajibPajakResult{} } func (p *CoreServiceCreateWajibPajakResult) InitDefault() { *p = CoreServiceCreateWajibPajakResult{} } var CoreServiceCreateWajibPajakResult_Success_DEFAULT *structs.CreateWajibPajakResponse func (p *CoreServiceCreateWajibPajakResult) GetSuccess() (v *structs.CreateWajibPajakResponse) { if !p.IsSetSuccess() { return CoreServiceCreateWajibPajakResult_Success_DEFAULT } return p.Success } var CoreServiceCreateWajibPajakResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceCreateWajibPajakResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceCreateWajibPajakResult_E_DEFAULT } return p.E } func (p *CoreServiceCreateWajibPajakResult) SetSuccess(x interface{}) { p.Success = x.(*structs.CreateWajibPajakResponse) } func (p *CoreServiceCreateWajibPajakResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceCreateWajibPajakResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceCreateWajibPajakResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceCreateWajibPajakResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceCreateWajibPajakResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceCreateWajibPajakResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceCreateWajibPajakResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceCreateWajibPajakResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewCreateWajibPajakResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceCreateWajibPajakResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceCreateWajibPajakResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "createWajibPajak_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceCreateWajibPajakResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceCreateWajibPajakResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceCreateWajibPajakResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceCreateWajibPajakResult(%+v)", *p) } type CoreServiceDeleteWajibPajakListArgs struct { Request *structs.DeleteWajibpajakListRequest `thrift:"request,1" frugal:"1,default,structs.DeleteWajibpajakListRequest" db:"request" json:"request"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceDeleteWajibPajakListArgs, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x19, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x61, 0x72, 0x67, 0x73, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x1, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceDeleteWajibPajakListArgs() *CoreServiceDeleteWajibPajakListArgs { return &CoreServiceDeleteWajibPajakListArgs{} } func (p *CoreServiceDeleteWajibPajakListArgs) InitDefault() { *p = CoreServiceDeleteWajibPajakListArgs{} } var CoreServiceDeleteWajibPajakListArgs_Request_DEFAULT *structs.DeleteWajibpajakListRequest func (p *CoreServiceDeleteWajibPajakListArgs) GetRequest() (v *structs.DeleteWajibpajakListRequest) { if !p.IsSetRequest() { return CoreServiceDeleteWajibPajakListArgs_Request_DEFAULT } return p.Request } func (p *CoreServiceDeleteWajibPajakListArgs) SetRequest(val *structs.DeleteWajibpajakListRequest) { p.Request = val } func (p *CoreServiceDeleteWajibPajakListArgs) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceDeleteWajibPajakListArgs = map[int16]string{ 1: "request", } func (p *CoreServiceDeleteWajibPajakListArgs) IsSetRequest() bool { return p.Request != nil } func (p *CoreServiceDeleteWajibPajakListArgs) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceDeleteWajibPajakListArgs[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceDeleteWajibPajakListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.Request = structs.NewDeleteWajibpajakListRequest() if err := p.Request.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceDeleteWajibPajakListArgs) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "deleteWajibPajakList_args"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceDeleteWajibPajakListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if err = oprot.WriteFieldBegin(ctx, "request", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.Request.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceDeleteWajibPajakListArgs) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceDeleteWajibPajakListArgs(%+v)", *p) } type CoreServiceDeleteWajibPajakListResult struct { Success *structs.DeleteWajibpajakListResponse `thrift:"success,0,optional" frugal:"0,optional,structs.DeleteWajibpajakListResponse" db:"success" json:"success,omitempty"` E *exceptions.CoreServicesException `thrift:"e,1,optional" frugal:"1,optional,exceptions.CoreServicesException" db:"e" json:"e,omitempty"` _unknownFields unknown.Fields } func init() { meta.RegisterStruct(NewCoreServiceDeleteWajibPajakListResult, []byte{ 0xb, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x61, 0x6a, 0x69, 0x62, 0x50, 0x61, 0x6a, 0x61, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x6, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0xf, 0x0, 0x3, 0xc, 0x0, 0x0, 0x0, 0x2, 0x6, 0x0, 0x1, 0x0, 0x0, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x7, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x6, 0x0, 0x1, 0x0, 0x1, 0xb, 0x0, 0x2, 0x0, 0x0, 0x0, 0x1, 0x65, 0x8, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0xc, 0x0, 0x4, 0x8, 0x0, 0x1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, }) } func NewCoreServiceDeleteWajibPajakListResult() *CoreServiceDeleteWajibPajakListResult { return &CoreServiceDeleteWajibPajakListResult{} } func (p *CoreServiceDeleteWajibPajakListResult) InitDefault() { *p = CoreServiceDeleteWajibPajakListResult{} } var CoreServiceDeleteWajibPajakListResult_Success_DEFAULT *structs.DeleteWajibpajakListResponse func (p *CoreServiceDeleteWajibPajakListResult) GetSuccess() (v *structs.DeleteWajibpajakListResponse) { if !p.IsSetSuccess() { return CoreServiceDeleteWajibPajakListResult_Success_DEFAULT } return p.Success } var CoreServiceDeleteWajibPajakListResult_E_DEFAULT *exceptions.CoreServicesException func (p *CoreServiceDeleteWajibPajakListResult) GetE() (v *exceptions.CoreServicesException) { if !p.IsSetE() { return CoreServiceDeleteWajibPajakListResult_E_DEFAULT } return p.E } func (p *CoreServiceDeleteWajibPajakListResult) SetSuccess(x interface{}) { p.Success = x.(*structs.DeleteWajibpajakListResponse) } func (p *CoreServiceDeleteWajibPajakListResult) SetE(val *exceptions.CoreServicesException) { p.E = val } func (p *CoreServiceDeleteWajibPajakListResult) CarryingUnknownFields() bool { return len(p._unknownFields) > 0 } var fieldIDToName_CoreServiceDeleteWajibPajakListResult = map[int16]string{ 0: "success", 1: "e", } func (p *CoreServiceDeleteWajibPajakListResult) IsSetSuccess() bool { return p.Success != nil } func (p *CoreServiceDeleteWajibPajakListResult) IsSetE() bool { return p.E != nil } func (p *CoreServiceDeleteWajibPajakListResult) Read(ctx context.Context, iprot thrift.TProtocol) (err error) { var name string var fieldTypeId thrift.TType var fieldId int16 if _, err = iprot.ReadStructBegin(ctx); err != nil { goto ReadStructBeginError } for { name, fieldTypeId, fieldId, err = iprot.ReadFieldBegin(ctx) if err != nil { goto ReadFieldBeginError } if fieldTypeId == thrift.STOP { break } switch fieldId { case 0: if fieldTypeId == thrift.STRUCT { if err = p.ReadField0(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } case 1: if fieldTypeId == thrift.STRUCT { if err = p.ReadField1(ctx, iprot); err != nil { goto ReadFieldError } } else { if err = iprot.Skip(ctx, fieldTypeId); err != nil { goto SkipFieldError } } default: if err = p._unknownFields.Append(ctx, iprot, name, fieldTypeId, fieldId); err != nil { goto UnknownFieldsAppendError } } if err = iprot.ReadFieldEnd(ctx); err != nil { goto ReadFieldEndError } } if err = iprot.ReadStructEnd(ctx); err != nil { goto ReadStructEndError } return nil ReadStructBeginError: return thrift.PrependError(fmt.Sprintf("%T read struct begin error: ", p), err) ReadFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T read field %d begin error: ", p, fieldId), err) ReadFieldError: return thrift.PrependError(fmt.Sprintf("%T read field %d '%s' error: ", p, fieldId, fieldIDToName_CoreServiceDeleteWajibPajakListResult[fieldId]), err) SkipFieldError: return thrift.PrependError(fmt.Sprintf("%T field %d skip type %d error: ", p, fieldId, fieldTypeId), err) UnknownFieldsAppendError: return thrift.PrependError(fmt.Sprintf("%T append unknown field(name:%s type:%d id:%d) error: ", p, name, fieldTypeId, fieldId), err) ReadFieldEndError: return thrift.PrependError(fmt.Sprintf("%T read field end error", p), err) ReadStructEndError: return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } func (p *CoreServiceDeleteWajibPajakListResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { p.Success = structs.NewDeleteWajibpajakListResponse() if err := p.Success.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceDeleteWajibPajakListResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { p.E = exceptions.NewCoreServicesException() if err := p.E.Read(ctx, iprot); err != nil { return err } return nil } func (p *CoreServiceDeleteWajibPajakListResult) Write(ctx context.Context, oprot thrift.TProtocol) (err error) { var fieldId int16 if err = oprot.WriteStructBegin(ctx, "deleteWajibPajakList_result"); err != nil { goto WriteStructBeginError } if p != nil { if err = p.writeField0(ctx, oprot); err != nil { fieldId = 0 goto WriteFieldError } if err = p.writeField1(ctx, oprot); err != nil { fieldId = 1 goto WriteFieldError } if err = p._unknownFields.Write(ctx, oprot); err != nil { goto UnknownFieldsWriteError } } if err = oprot.WriteFieldStop(ctx); err != nil { goto WriteFieldStopError } if err = oprot.WriteStructEnd(ctx); err != nil { goto WriteStructEndError } return nil WriteStructBeginError: return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) WriteFieldError: return thrift.PrependError(fmt.Sprintf("%T write field %d error: ", p, fieldId), err) WriteFieldStopError: return thrift.PrependError(fmt.Sprintf("%T write field stop error: ", p), err) WriteStructEndError: return thrift.PrependError(fmt.Sprintf("%T write struct end error: ", p), err) UnknownFieldsWriteError: return thrift.PrependError(fmt.Sprintf("%T write unknown fields error: ", p), err) } func (p *CoreServiceDeleteWajibPajakListResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetSuccess() { if err = oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { goto WriteFieldBeginError } if err := p.Success.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 0 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 0 end error: ", p), err) } func (p *CoreServiceDeleteWajibPajakListResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { if p.IsSetE() { if err = oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { goto WriteFieldBeginError } if err := p.E.Write(ctx, oprot); err != nil { return err } if err = oprot.WriteFieldEnd(ctx); err != nil { goto WriteFieldEndError } } return nil WriteFieldBeginError: return thrift.PrependError(fmt.Sprintf("%T write field 1 begin error: ", p), err) WriteFieldEndError: return thrift.PrependError(fmt.Sprintf("%T write field 1 end error: ", p), err) } func (p *CoreServiceDeleteWajibPajakListResult) String() string { if p == nil { return "" } return fmt.Sprintf("CoreServiceDeleteWajibPajakListResult(%+v)", *p) }